|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.webcompmath.awt.ExpressionInput.EI
protected class ExpressionInput.EI
The expression associated with an ExpressionInput belongs to this class. So is any derivative of such a function. Note that derivatives must be recomputed when the expression changes. This is done via "lazy evaluation", that is, only when necessary. When a derivative is used, it tests whether it is out of date by comparing its serialNumber to the serial number of the expression that it is the derivative of. If they don't match, then the expression is recomputed and the serial number is updated. The serial number and defintion of the main expresssion is changed by checkInput() whenever the user's input has changed.
Method Summary | |
---|---|
boolean |
dependsOn(Variable x)
Get whether this expression depends on a particular variable |
Expression |
derivative(Variable wrt)
Get the derivative of the expression |
double |
getVal()
Returns the value of the expression |
double |
getValueWithCases(Cases c)
Returns the value of the expression |
java.lang.String |
toString()
Convert the expression to a string |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public double getVal()
getVal
in interface Value
public double getValueWithCases(Cases c)
getValueWithCases
in interface Expression
c
- the cases to use
public java.lang.String toString()
toString
in interface Expression
toString
in class java.lang.Object
public Expression derivative(Variable wrt)
derivative
in interface Expression
wrt
- variable with respect to
public boolean dependsOn(Variable x)
dependsOn
in interface Expression
x
- the valiable to check
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |