gridripper::math::expr::FnCollection Class Reference

Collection of constant and function definitions. More...

List of all members.

Public Member Functions

 FnCollection (String xname, List< StkOp > stkops, List< Evaluator.Function > varlist)
 Creates a collection for the specified independent variable.
double eval (String expr)
 Evaluates a constant expression.
void addConst (String constname, String expr) throws IllegalArgumentException
 Adds a constant.
StkVar getStkVar (String varname)
 Gets a stack variable.
void addConstsAndVars (String defs) throws IllegalArgumentException
 Adds constants and dependent variables appearing in the specified string.
Evaluator.Function addVar (String varname, String expr) throws IllegalArgumentException
 Adds a dependent variable.
Evaluator.Function getVar (String varname)
 Gets a dependent variable.
Evaluator.Function findVar (String name_or_def)
 Finds a dependent variable.


Detailed Description

Collection of constant and function definitions.

Version:
12/19/2008
Since:
GridRipper 12/16/2008
Author:
Peter Csizmadia

Constructor & Destructor Documentation

gridripper::math::expr::FnCollection::FnCollection ( String  xname,
List< StkOp stkops,
List< Evaluator.Function >  varlist 
) [inline]

Creates a collection for the specified independent variable.

Parameters:
xname the name of the independent variable
stkops list of constants and other stack operations
varlist list of dependent variables


Member Function Documentation

double gridripper::math::expr::FnCollection::eval ( String  expr  )  [inline]

Evaluates a constant expression.

Dependent variables should not appear in it.

Parameters:
expr the expression
Returns:
the value

void gridripper::math::expr::FnCollection::addConst ( String  constname,
String  expr 
) throws IllegalArgumentException [inline]

Adds a constant.

Parameters:
constname the name
expr the expression defining its value

StkVar gridripper::math::expr::FnCollection::getStkVar ( String  varname  )  [inline]

Gets a stack variable.

Parameters:
varname the name
Returns:
the stack variable or null if not found

void gridripper::math::expr::FnCollection::addConstsAndVars ( String  defs  )  throws IllegalArgumentException [inline]

Adds constants and dependent variables appearing in the specified string.

Parameters:
defs list of definitions, separated by semicolons
Returns:
the stack variable

Evaluator.Function gridripper::math::expr::FnCollection::addVar ( String  varname,
String  expr 
) throws IllegalArgumentException [inline]

Adds a dependent variable.

Parameters:
varname the name
expr the defining expression
Returns:
the function representing the dependent variable

Evaluator.Function gridripper::math::expr::FnCollection::getVar ( String  varname  )  [inline]

Gets a dependent variable.

Parameters:
varname the name
Returns:
the function representing the dependent variable or null if not found

Evaluator.Function gridripper::math::expr::FnCollection::findVar ( String  name_or_def  )  [inline]

Finds a dependent variable.

The variable can optionally be created if not found.

Parameters:
name_or_def name or the definition to be use if the variable is not found
Returns:
the function representing the dependent variable or null if not found (and not created)


The documentation for this class was generated from the following file:

Generated on Wed Jun 17 18:47:29 2009 for GridRipper by  doxygen 1.5.6