Package com.singularsys.extensions.djep
Interface DiffRulesI
-
- All Superinterfaces:
JepComponent
,java.io.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 a object which implements this interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Node
differentiate(ASTFunNode node, java.lang.String var, Node[] children, Node[] dchildren)
Returns the top node of of the derivative of this function wrt to variable var.java.lang.String
getName()
Returns the name of the function.java.lang.String
toString()
Returns a string representation of the rule.-
Methods inherited from interface com.singularsys.jep.JepComponent
getLightWeightInstance, init
-
-
-
-
Method Detail
-
differentiate
Node differentiate(ASTFunNode node, java.lang.String var, Node[] children, Node[] dchildren) throws ParseException, JepException
Returns the top node of 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
java.lang.String toString()
Returns a string representation of the rule.- Overrides:
toString
in classjava.lang.Object
-
getName
java.lang.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.
-
-