Interface DiffRulesI

All Superinterfaces:
JepComponent, Serializable
All Known Implementing Classes:
ChainRuleDiffRules, DivideDiffRule, IfDiffRule, MacroDiffRules, MacroFunctionDiffRules, MultiplyDiffRule, PassThroughDiffRule, PowerDiffRule, ZeroDiffRule

public interface DiffRulesI extends JepComponent
Defines a set of rules describing how to differentiate a function. Each function to be differentiated should have an object which implements this interface.
  • Method Details

    • differentiate

      Node differentiate(ASTFunNode node, String var, Node[] children, Node[] dchildren) throws ParseException, JepException
      Returns the top node of the derivative of this function wrt to variable var.
      Parameters:
      var - The name of variable to differentiate wrt to.
      children - the arguments of the function
      dchildren - the derivatives of each argument of the function.
      Returns:
      top node of and expression tree for the derivative.
      Throws:
      ParseException - if there is some problem in compiling the derivative.
      JepException
    • toString

      String toString()
      Returns a string representation of the rule.
      Overrides:
      toString in class Object
    • getName

      String getName()
      Returns the name of the function. Used as index in hashtable and as way of linking with standard Jep functions. You probably want to specify the in the constructors.