public class IfDiffRule extends java.lang.Object implements DiffRulesI
if(cond,trueExpr,falseExpr)
where
the first argument should not be differentiated, but subsequent ones should
be.Constructor and Description |
---|
IfDiffRule(Jep jep,
java.lang.String name) |
Modifier and Type | Method and 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.
|
JepComponent |
getLightWeightInstance()
Gets a light-weight instance suitable for using in multiple threads.
|
java.lang.String |
getName()
Returns the name of the function.
|
void |
init(Jep jep)
Initialize the component.
|
java.lang.String |
toString()
Returns a string representation of the rule.
|
public IfDiffRule(Jep jep, java.lang.String name)
public void init(Jep jep)
JepComponent
init
in interface JepComponent
jep
- the current Jep instancepublic JepComponent getLightWeightInstance()
JepComponent
getLightWeightInstance
in interface JepComponent
public Node differentiate(ASTFunNode node, java.lang.String var, Node[] children, Node[] dchildren) throws ParseException, JepException
DiffRulesI
differentiate
in interface DiffRulesI
var
- The name of variable to differentiate wrt to.children
- the arguments of the functiondchildren
- the derivatives of each argument of the function.ParseException
- if there is some problem in compiling the derivative.JepException
public java.lang.String getName()
DiffRulesI
getName
in interface DiffRulesI
public java.lang.String toString()
DiffRulesI
toString
in interface DiffRulesI
toString
in class java.lang.Object
Copyright © 2018 Singular Systems http://www.singularsys.com/jep