|
MVT API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--math.objects.Expression
|
+--math.objects.Constant
|
+--math.constants.RealConstant
The class Constant is used to create mathematical Constant objects. It extends the Expression class.
| Constructor Summary | |
RealConstant(double value)
|
|
| Method Summary | |
double |
evaluate(VariableSet vars,
double[] values)
A method used to evaluate a Constant object given an ordered variable vector and a corresponding array of constant double values |
Expression |
evaluateVariables(VariableSet variables,
double[] values)
A method used to evaluate a Constant object containing multiple variables given only one variable name and one value |
double |
getValue()
Returns the Constant object's value as a double |
void |
setValue(double value)
Alternate method to set the Constant object's value to a double |
java.lang.String |
toString()
Overrides the toString() method of the Object class. |
| Methods inherited from class math.objects.Constant |
differentiate, simplify |
| Methods inherited from class math.objects.Expression |
evaluate, evaluate, evaluate, evaluate, evaluate |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public RealConstant(double value)
| Method Detail |
public double getValue()
public void setValue(double value)
public java.lang.String toString()
toString in class java.lang.Object
public double evaluate(VariableSet vars,
double[] values)
throws java.lang.ArithmeticException,
VariableUndefinedException,
IllegalEvaluationException
evaluate in class Expressionvars - the name of the VariableVector of Variables
associated with the function.
VariableUndefinedException - for Variables not defined
java.lang.ArithmeticException - for NaN and Divide by Zero
IllegalEvaluationException - if an error occurs
public Expression evaluateVariables(VariableSet variables,
double[] values)
throws java.lang.ArithmeticException,
IllegalEvaluationException
evaluateVariables in class Expressionvariables - a VariableSet valuevalues - a double[] value
IllegalEvaluationException - if the number of variables
do not equal the number of values.
java.lang.ArithmeticException - for NaN and Divide by Zero
|
MVT API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||