public abstract class ChainRuleDiffRules extends Object implements DiffRulesI
| Modifier and Type | Field and Description |
|---|---|
protected String |
name |
protected PostfixMathCommandI |
pfmc |
protected Node[] |
rules |
| Constructor and Description |
|---|
ChainRuleDiffRules()
Cannot construct outside the context of a differentation visitor.
|
| Modifier and Type | Method and Description |
|---|---|
Node |
differentiate(ASTFunNode node,
String var,
Node[] children,
Node[] dchildren,
DJep djep)
Use the chain rule to differentiate.
|
String |
getName()
returns the name of the function
|
int |
getNumRules()
Returns the number of rules which should be number of arguments of function
|
PostfixMathCommandI |
getPfmc()
returns the PostfixMathCommandI for the function.
|
Node |
getRule(int i)
returns the i-th rule as an expression tree.
|
String |
toString()
Returns a string representation of the rule.
|
protected String name
protected PostfixMathCommandI pfmc
protected Node[] rules
public ChainRuleDiffRules()
public String getName()
getName in interface DiffRulesIpublic PostfixMathCommandI getPfmc()
public int getNumRules()
public Node getRule(int i)
public Node differentiate(ASTFunNode node, String var, Node[] children, Node[] dchildren, DJep djep) throws ParseException
differentiate in interface DiffRulesIvar - 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.public String toString()
DiffRulesItoString in interface DiffRulesItoString in class ObjectCopyright © 2018. All rights reserved.