| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.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 Valuepublic double getValueWithCases(Cases c)
getValueWithCases in interface Expressionc - the cases to use
public java.lang.String toString()
toString in interface ExpressiontoString in class java.lang.Objectpublic Expression derivative(Variable wrt)
derivative in interface Expressionwrt - variable with respect to
public boolean dependsOn(Variable x)
dependsOn in interface Expressionx - the valiable to check
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||