edu.stanford.rsl.konrad.numerics.mathexpressions
Class IdentifierExpression
java.lang.Object
edu.stanford.rsl.konrad.numerics.mathexpressions.AbstractMathExpression
edu.stanford.rsl.konrad.numerics.mathexpressions.IdentifierExpression
public class IdentifierExpression
- extends AbstractMathExpression
A wrapper class for identifiers
- Author:
- Rotimi X Ojo
Method Summary |
double |
evaluate(java.util.Map<java.lang.String,java.lang.Double> variablesMap)
Determines the value of string expression represented by this class by replacing variables with values provided in map;
If expression has no variable evaluate() should be called; |
java.lang.String |
toString()
Converts a mathematical expression an equivalent string literal |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
IdentifierExpression
public IdentifierExpression(java.lang.String name)
evaluate
public double evaluate(java.util.Map<java.lang.String,java.lang.Double> variablesMap)
- Description copied from class:
AbstractMathExpression
- Determines the value of string expression represented by this class by replacing variables with values provided in map;
If expression has no variable evaluate() should be called;
- Specified by:
evaluate
in class AbstractMathExpression
- Returns:
- the evaluation result
toString
public java.lang.String toString()
- Description copied from class:
AbstractMathExpression
- Converts a mathematical expression an equivalent string literal
- Specified by:
toString
in class AbstractMathExpression