Class DifferentiationVisitor

All Implemented Interfaces:
GenericVisitor<Node,String,ParseException>, JepComponent, Serializable
Direct Known Subclasses:
MatrixDifferentiationVisitor

public class DifferentiationVisitor extends GenericDeepCopyVisitor<String>
A class for performing differentiation of an expression. To use do
 Jep j = ...; Node in = ...;
 DifferentiationVisitor dv = new DifferentiationVisitor(jep);
 dv.addStandardDiffRules();
 Node out = dv.differentiate(in,"x");
 
The class follows the visitor pattern described in ParserVisitor. The rules for differentiating specific functions are contained in object which implement DiffRulesI A number of inner classes which use this interface are defined for specific function types. In particular MacroDiffRules allow the rule for differentiation to be specified by strings. New rules can be added using DJep.addDiffRule(com.singularsys.extensions.djep.DiffRulesI) method.
Author:
R Morris Created on 19-Jun-2003
See Also: