org.lsmp.djep.djep
Class PartialDerivative
java.lang.Object
java.util.Observable
org.nfunk.jep.Variable
org.lsmp.djep.xjep.XVariable
org.lsmp.djep.djep.PartialDerivative
- All Implemented Interfaces:
- Observer
- Direct Known Subclasses:
- MatrixPartialDerivative
public class PartialDerivative
- extends XVariable
- implements Observer
Contains infomation about a PartialDerivative of a variable.
Should
- Author:
- Rich Morris
Created on 29-Oct-2003
PartialDerivative
protected PartialDerivative(DVariable var,
String[] derivnames)
- Protected constructor, should only be constructed
through the findDerivative method in
DVariable.
PartialDerivative
protected PartialDerivative(DVariable var,
String[] derivnames,
Node deriv)
getName
public String getName()
- Overrides:
getName in class Variable
getRoot
public DVariable getRoot()
- Every partial derivative has a root variable
for instance the root variable of dy/dx is y.
This method returns than variable.
getDnames
public String[] getDnames()
toString
public String toString()
- Description copied from class:
Variable
- Returns a string with the variable name followed by it's value.
For example for the variable "a" with the value 10, the following
string is returned:
a: 10
If the variable is a constant the string " (Constant" is appended.
- Overrides:
toString in class Variable
- Returns:
- A string with the variable name and value.
findDerivative
public PartialDerivative findDerivative(String dname,
DJep jep)
throws ParseException
- Throws:
ParseException
update
public void update(Observable arg0,
Object arg1)
- When the value of the root object is changed
makes the value of this partial derivative invalid.
- Specified by:
update in interface Observer
- See Also:
Observer.update(java.util.Observable, java.lang.Object)
Copyright © 2014. All rights reserved.