#include <FnCollection.h>
Public Member Functions | |
| FnCollection (const string &xname, const tvector< StkOp * > &stkops, const tvector< Evaluator::Function * > &varlist) | |
| Creates a collection for the specified independent variable. | |
| GReal_t | eval (const string &expr) |
| Evaluates a constant expression. | |
| void | addConst (const string &constname, const string &expr) throw (IllegalArgumentException&) |
| Adds a constant. | |
| StkVar * | getStkVar (const string &varname) const |
| Gets a stack variable. | |
| void | addConstsAndVars (const string &defs) throw (IllegalArgumentException&) |
| Adds constants and dependent variables appearing in the specified string. | |
| Evaluator::Function * | addVar (const string &varname, const string &expr) throw (IllegalArgumentException&) |
| Adds a dependent variable. | |
| Evaluator::Function * | getVar (const string &varname) const |
| Gets a dependent variable. | |
| Evaluator::Function * | findVar (const string &name_or_def) |
| Finds a dependent variable. | |
| gridripper::math::expr::FnCollection::FnCollection | ( | const string & | xname, | |
| const tvector< StkOp * > & | stkops, | |||
| const tvector< Evaluator::Function * > & | varlist | |||
| ) |
Creates a collection for the specified independent variable.
| xname | the name of the independent variable | |
| stkops | list of constants and other stack operations | |
| varlist | list of dependent variables |
| GReal_t gridripper::math::expr::FnCollection::eval | ( | const string & | expr | ) |
Evaluates a constant expression.
Dependent variables should not appear in it.
| expr | the expression |
| void gridripper::math::expr::FnCollection::addConst | ( | const string & | constname, | |
| const string & | expr | |||
| ) | throw (IllegalArgumentException&) |
| StkVar* gridripper::math::expr::FnCollection::getStkVar | ( | const string & | varname | ) | const |
Gets a stack variable.
| varname | the name |
| void gridripper::math::expr::FnCollection::addConstsAndVars | ( | const string & | defs | ) | throw (IllegalArgumentException&) |
Adds constants and dependent variables appearing in the specified string.
| defs | list of definitions, separated by semicolons |
| Evaluator::Function* gridripper::math::expr::FnCollection::addVar | ( | const string & | varname, | |
| const string & | expr | |||
| ) | throw (IllegalArgumentException&) |
Adds a dependent variable.
| varname | the name | |
| expr | the defining expression |
| Evaluator::Function* gridripper::math::expr::FnCollection::getVar | ( | const string & | varname | ) | const |
Gets a dependent variable.
| varname | the name |
| Evaluator::Function* gridripper::math::expr::FnCollection::findVar | ( | const string & | name_or_def | ) |
Finds a dependent variable.
The variable can optionally be created if not found.
| name_or_def | name or the definition to be use if the variable is not found |
1.5.6