org.lsmp.djep.djep
Class PartialDerivative

java.lang.Object
  extended by java.util.Observable
      extended by org.nfunk.jep.Variable
          extended by org.lsmp.djep.xjep.XVariable
              extended by 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

Field Summary
 
Fields inherited from class org.nfunk.jep.Variable
name
 
Constructor Summary
protected PartialDerivative(DVariable var, java.lang.String[] derivnames)
          Protected constructor, should only be constructed through the findDerivative method in DVariable.
protected PartialDerivative(DVariable var, java.lang.String[] derivnames, Node deriv)
           
 
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 org.lsmp.djep.xjep.XVariable
calcValue, getEquation, hasEquation, setEquation, toString
 
Methods inherited from class org.nfunk.jep.Variable
getValue, hasValidValue, isConstant, setIsConstant, setValidValue, setValue, setValueRaw
 
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
 

Constructor Detail

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)
Method Detail

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