Package com.singularsys.extensions.djep
Interface DiffRulesI
- All Superinterfaces:
JepComponent,Serializable
- All Known Implementing Classes:
ChainRuleDiffRules,DivideDiffRule,IfDiffRule,MacroDiffRules,MacroFunctionDiffRules,MultiplyDiffRule,PassThroughDiffRule,PowerDiffRule,ZeroDiffRule
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 Summary
Modifier and TypeMethodDescriptiondifferentiate(ASTFunNode node, String var, Node[] children, Node[] dchildren) Returns the top node of the derivative of this function wrt to variable var.getName()Returns the name of the function.toString()Returns a string representation of the rule.Methods inherited from interface com.singularsys.jep.JepComponent
getLightWeightInstance, init
-
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 functiondchildren- 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. -
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.
-