Class XFunctionTable

All Implemented Interfaces:
JepComponent, Serializable

public class XFunctionTable extends StandardFunctionTable
Add the following functions to the standard function table:
  • clean(expr) - clean an expression.
  • eqn(expr) - extract the equation from an expression.
  • eval(expr) - evaluate an expression,
  • rewrite(expr) - rewrite an expression using a rewrite rules
  • compare(expr1,expr2) - compare two expressions symbolically
  • symequals(expr1,expr2) - check if two expressions are symbolically equal
  • expand(expr) - expand an expression
  • simplify(expr) - simplify an expression without expansion
  • coeffs(expr,var) - return the coefficients of an expression in a variable
Also the rand functions uses DirtyRandom to prevents cleaning by ExpressionCleaner.

Name of the functions are read from the resource bundle, so they can be changed by providing a custom resource bundle.

See Also:
  • Constructor Details

  • Method Details

    • shallowCopy

      public FunctionTable shallowCopy()
      Description copied from class: FunctionTable
      Returns a new shallow copy of this function table. Calls the FunctionTable.threadSafeMapCopy() method to ensure the table is safe to use a separate thread. All subclasses should override this method to create a function table of the matching type. A typical implementation would be
       @Override
       public FunctionTable shallowCopy() {
           Map<String,PostfixMathCommandI> newMap = this.threadSafeMapCopy();
           return new myFunctionTable(newMap);
       }
       
      using the FunctionTable.threadSafeMapCopy() method to return a copy of the map of functions and a constructor taking this map which uses the FunctionTable(Map) constructor.
      Overrides:
      shallowCopy in class StandardFunctionTable
      Returns:
      a new shallow copy of this function table
    • addXFunctions

      protected void addXFunctions()