|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Expression
An Expression represents a mathematical expression such as "x+1" or "3" or "sin(x*ln(x)-3*abs(x/4))". An expression has a value, which can depend on the values of variables that occur in the expression. An expression can be differenetiated with respect to a variable. It has a print string representation. This interface is implemented by the classes Constant, Variable, and ExpressionProgram, for example. The Expression interface represents all the properties of expressions that you are likely to need to know about, unless you want to write a new kind of ExpressionCommand.
Method Summary | |
---|---|
boolean |
dependsOn(Variable x)
Checks whether the expression has any dependence on the variable x. |
Expression |
derivative(Variable wrt)
Return an Expression that represents the derivative of this expression with respect to the variable wrt. |
double |
getValueWithCases(Cases cases)
Compute and return the value of this expression. |
java.lang.String |
toString()
Get a print string representation of this expression. |
Methods inherited from interface net.sourceforge.webcompmath.data.Value |
---|
getVal |
Method Detail |
---|
double getValueWithCases(Cases cases)
cases
- cases to use
Expression derivative(Variable wrt)
wrt
- variable with respect to
boolean dependsOn(Variable x)
x
- variable to check
java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |