OMD Documentation

Simplification Utilities

This module provides a collection of helper functions that are used throughout the simplification engine and rules. These utilities handle common tasks like creating nodes, manipulating expression trees, and formatting output.

Core Functions

gcd(a, b)

createConstantNode(value, fontSize)

createRationalNode(numerator, denominator, fontSize)

nodeToString(node)

Expression Tree Manipulation

flattenSum(node, terms)

buildSumTree(terms, fontSize)

_replaceNodeInTree(oldNode, newNode, currentRoot)

Polynomial and Monomial Helpers

expandPolynomialPower(terms, exponent, fontSize)

expandBinomialSquare(terms, fontSize)

expandBinomialCube(terms, fontSize)

expandBinomialFourth(terms, fontSize)

multiplyTermArrays(terms1, terms2, fontSize)

Provenance Helpers

extractLeafNodes(node)

extractMonomialProvenance(termNode)

createMonomialWithGranularProvenance(...)

See Also

↑ Top