Package com.singularsys.extensions.djep
Class PartialDerivative
- java.lang.Object
-
- java.util.Observable
-
- com.singularsys.jep.Variable
-
- com.singularsys.extensions.xjep.XVariable
-
- com.singularsys.extensions.djep.DVariable
-
- com.singularsys.extensions.djep.PartialDerivative
-
- All Implemented Interfaces:
java.io.Serializable,java.util.Observer
public class PartialDerivative extends DVariable implements java.util.Observer
Contains information about a PartialDerivative of a variable.- Author:
- Rich Morris Created on 29-Oct-2003
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedPartialDerivative(DVariable var, java.lang.String[] derivnames)Protected constructor, should only be constructed through the findDerivative method inDVariable.protectedPartialDerivative(DVariable var, java.lang.String[] derivnames, Node deriv)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanderivativeIsTrivallyZero()PartialDerivativefindDerivative(java.lang.String dname, DJep jep)java.lang.String[]getDnames()java.lang.StringgetName()Returns the variable name.DVariablegetRoot()Every partial derivative has a root variable for instance the root variable of dy/dx is y.java.lang.StringtoString()Returns a string rep of variable with its equation and value.voidupdate(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 com.singularsys.extensions.djep.DVariable
allDerivatives, calculateDerivative, createDerivative, getDerivative, invalidateAll, makeDerivString, setEquation, toString
-
Methods inherited from class com.singularsys.extensions.xjep.XVariable
calcValue, getEquation, hasEquation
-
Methods inherited from class com.singularsys.jep.Variable
getHook, getValue, hasValidValue, hookKeys, isConstant, removeHook, setHook, setIsConstant, setValidValue, setValue, setValue, setValueRaw
-
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from class:VariableReturns the variable name.
-
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:XVariableReturns a string rep of variable with its equation 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:
updatein interfacejava.util.Observer- See Also:
Observer.update(java.util.Observable, java.lang.Object)
-
derivativeIsTrivallyZero
public boolean derivativeIsTrivallyZero()
- Overrides:
derivativeIsTrivallyZeroin classDVariable
-
-