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:
- java.util.Observer
- Direct Known Subclasses:
- MatrixPartialDerivative
public class PartialDerivative
- extends XVariable
- implements java.util.Observer
Contains infomation about a PartialDerivative of a variable.
Should
- Author:
- Rich Morris
Created on 29-Oct-2003
Method Summary |
PartialDerivative |
findDerivative(java.lang.String dname,
DJep jep)
|
java.lang.String[] |
getDnames()
|
java.lang.String |
getName()
|
DVariable |
getRoot()
Every partial derivative has a root variable
for instance the root variable of dy/dx is y. |
java.lang.String |
toString()
Returns a string with the variable name followed by it's value. |
void |
update(java.util.Observable arg0,
java.lang.Object arg1)
When the value of the root object is changed
makes the value of this partial derivative invalid. |
Methods inherited from class java.util.Observable |
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PartialDerivative
protected PartialDerivative(DVariable var,
java.lang.String[] derivnames)
- Protected constructor, should only be constructed
through the findDerivative method in
DVariable
.
PartialDerivative
protected PartialDerivative(DVariable var,
java.lang.String[] derivnames,
Node deriv)
getName
public java.lang.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 java.lang.String[] getDnames()
toString
public java.lang.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(java.lang.String dname,
DJep jep)
throws ParseException
- Throws:
ParseException
update
public void update(java.util.Observable arg0,
java.lang.Object arg1)
- When the value of the root object is changed
makes the value of this partial derivative invalid.
- Specified by:
update
in interface java.util.Observer
- See Also:
Observer.update(java.util.Observable, java.lang.Object)
http://www.singularsys.com/jep Copyright © 2007 Singular Systems