public class PowerDiffRule extends java.lang.Object implements DiffRulesI
y^z
with respect to a variable. If z is a
constant number diff(y^z,x) -> z * y^(z-1)
If y is a constant
number diff(y^z,x) -> y^z * ln(z) * diff(z,x)
otherwise
diff(y^z,x) -> z * y^(z-1) * diff(y,x) + y^z * ln(z) * diff(z,x)
Constructor and Description |
---|
PowerDiffRule(DJep djep,
Operator op) |
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.
|
java.lang.Object |
getEvalue() |
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 djep)
Initialize the component.
|
void |
setEvalue(java.lang.Object eValue)
Sets the value used to detect if a constant is e, default Math.E
|
java.lang.String |
toString()
Returns a string representation of the rule.
|
public void init(Jep djep)
JepComponent
init
in interface JepComponent
djep
- the current Jep instancepublic JepComponent getLightWeightInstance()
JepComponent
getLightWeightInstance
in interface JepComponent
public java.lang.String toString()
DiffRulesI
toString
in interface DiffRulesI
toString
in class java.lang.Object
public java.lang.String getName()
DiffRulesI
getName
in interface DiffRulesI
public Node differentiate(ASTFunNode node, java.lang.String var, Node[] children, Node[] dchildren) throws 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.Object getEvalue()
public void setEvalue(java.lang.Object eValue)
eValue
- value to use will be tested using values equals method.Copyright © 2018 Singular Systems http://www.singularsys.com/jep