hilbert.js

JavaScript expression parsing, MathML rendering and CAS.

Expression

Expression

Kind: global class


expression.simplified : Expression

Returns the simplest mathematically equivalent expression.

Kind: instance property of Expression


expression.variables : Array.<String>

Returns a list of all variables used in the expression.

Kind: instance property of Expression


expression.functions : Array.<String>

Returns a list of all functions called by the expression.

Kind: instance property of Expression


expression.evaluate([_vars]) : number | null

Evaluates an expression using a given map of variables and functions.

Kind: instance method of Expression

Param Type
[_vars] Object.<String, Expression>

expression.substitute([_vars]) : Expression

Substitutes a new expression for a variable.

Kind: instance method of Expression

Param Type
[_vars] Object.<String, Expression>

expression.toString() : string

Converts the expression to a plain text string.

Kind: instance method of Expression


expression.toMathML() : string

Converts the expression to a MathML string.

Kind: instance method of Expression


Expression.parse(str) : Expression

Parses a string to an expression.

Kind: static method of Expression

Param Type
str string

ExprError

Expression Error Class

Kind: global class


Functions

Parser

Symbols