Jump to navigation

Class: Ruleset

Numbas.jme.rules.Ruleset

new Ruleset(rules, flags)

Set of simplification rules.

Parameters:
Name Type Description
rules Array.<Numbas.jme.rules.Rule>
flags Numbas.jme.rules.ruleset_flags
Source:

Methods

flagSet(flag) → {boolean}

Test whether flag is set.

Parameters:
Name Type Description
flag string
Returns:
Type Description
boolean
Source:

simplify(exprTree, scope) → {Numbas.jme.tree}

Apply this set's rules to the given expression until they don't change any more.

Parameters:
Name Type Description
exprTree Numbas.jme.tree
scope Numbas.jme.Scope
Returns:
Type Description
Numbas.jme.tree
Source:
See: