org.simulator.sbml.astnode
Class FunctionValue

java.lang.Object
  extended by org.simulator.sbml.astnode.ASTNodeValue
      extended by org.simulator.sbml.astnode.FunctionValue

public class FunctionValue
extends ASTNodeValue

This class computes and stores values of ASTNodes that refer to the application of a FunctionDefinition.

Version:
$Rev: 203 $
Author:
Roland Keller

Field Summary
protected  double[] argumentValues
          The current values of the function arguments.
protected  ASTNodeValue evaluationBlock
          The value of the evaluation block of the function stored in an ASTNodeObject.
protected  Map<String,Integer> indexMap
          A map for storing the indexes of the arguments in the array argumentValues.
protected  ASTNode math
          The math of the function definition.
protected  List<String> variables
          The variables of the function
 
Fields inherited from class org.simulator.sbml.astnode.ASTNodeValue
alreadyProcessed, booleanValue, children, denominator, doubleValue, exponent, interpreter, isConstant, isDouble, isInfinite, leftChild, logger, mantissa, name, node, nodeType, numChildren, numerator, real, rightChild, time, units
 
Constructor Summary
FunctionValue(ASTNodeInterpreter interpreter, ASTNode node, List<ASTNode> variableNodes)
           
 
Method Summary
protected  void computeBooleanValue()
          Computes the boolean value of the node.
protected  void computeDoubleValue()
          Computes the double value of the node.
 double[] getArgumentValues()
          Returns the values of the arguments.
 int getIndex(String argumentName)
          Returns the index of a specific argument.
 void setMath(ASTNode math)
          Sets the math and evaluation block of the function definition.
 
Methods inherited from class org.simulator.sbml.astnode.ASTNodeValue
compileBoolean, compileDouble, getConstant, getName, getTime, getValue, isName, reset, setTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

evaluationBlock

protected ASTNodeValue evaluationBlock
The value of the evaluation block of the function stored in an ASTNodeObject.


variables

protected List<String> variables
The variables of the function


argumentValues

protected double[] argumentValues
The current values of the function arguments.


indexMap

protected Map<String,Integer> indexMap
A map for storing the indexes of the arguments in the array argumentValues.


math

protected ASTNode math
The math of the function definition.

Constructor Detail

FunctionValue

public FunctionValue(ASTNodeInterpreter interpreter,
                     ASTNode node,
                     List<ASTNode> variableNodes)
Parameters:
the - interpreter
the - corresponding ASTNode
the - variables of the function as ASTNodes
Method Detail

computeDoubleValue

protected void computeDoubleValue()
Description copied from class: ASTNodeValue
Computes the double value of the node.

Overrides:
computeDoubleValue in class ASTNodeValue

computeBooleanValue

protected void computeBooleanValue()
Description copied from class: ASTNodeValue
Computes the boolean value of the node.

Overrides:
computeBooleanValue in class ASTNodeValue

setMath

public void setMath(ASTNode math)
Sets the math and evaluation block of the function definition.

Parameters:
math -

getArgumentValues

public double[] getArgumentValues()
Returns the values of the arguments.

Returns:

getIndex

public int getIndex(String argumentName)
Returns the index of a specific argument.

Parameters:
argumentName -
Returns: