edu.stanford.rsl.konrad.numerics.mathexpressions
Class FunctionExpression

java.lang.Object
  extended by edu.stanford.rsl.konrad.numerics.mathexpressions.AbstractMathExpression
      extended by edu.stanford.rsl.konrad.numerics.mathexpressions.FunctionExpression

public class FunctionExpression
extends AbstractMathExpression

A wrapper class for functions

Author:
Rotimi X Ojo

Constructor Summary
FunctionExpression(java.lang.String functionName, AbstractMathExpression valueExp)
           
 
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 edu.stanford.rsl.konrad.numerics.mathexpressions.AbstractMathExpression
evaluate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FunctionExpression

public FunctionExpression(java.lang.String functionName,
                          AbstractMathExpression valueExp)
Method Detail

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