#include <Evaluator.h>
Static Public Member Functions | |
static Function * | createFunction (const string &expr, const string &varname, const tvector< StkOp * > &stkops=*(const tvector< StkOp * > *) 0, const tvector< Function * > &depvars=*(const tvector< Function * > *) 0) throw (IllegalArgumentException&) |
Creates a function from the specified string. | |
static StkConst * | addConst (const string &def, tvector< StkOp * > stkops) throw (IllegalArgumentException&) |
Creates a constant and adds it to the list. | |
static void | addConsts (const string &defs, tvector< StkOp * > &stkops) throw (IllegalArgumentException&) |
Creates constants from the definitions in the specified string. | |
static int | findStkOp (const tvector< StkOp * > &stkops, const string &name) |
Finds the stack operation with the specified name in the list. | |
static Function * | addVar (const string &def, const string &varname, const tvector< StkOp * > &stkops, tvector< Function * > &depvars) throw (IllegalArgumentException&) |
Creates a dependent variable and adds it to the list. | |
static void | addVars (const string &defs, const string &varname, tvector< StkOp * > &stkops, tvector< Function * > &depvars) throw (IllegalArgumentException&) |
Creates dependent variables from the definitions in the specified string. | |
static void | addConstsAndVars (const string &defs, const string &varname, tvector< StkOp * > &stkops, tvector< Function * > &depvars) throw (IllegalArgumentException&) |
Creates constants and dependent variables from the definitions in the specified string. | |
static int | findFunction (const tvector< Function * > &funcs, const string &name) |
Finds the function with the specified name in the list. | |
static GReal_t | eval (const string &expr, const tvector< StkOp * > &stkops=*(const tvector< StkOp * > *) 0) throw (IllegalArgumentException&) |
Evaluates the specified expression. | |
Classes | |
class | Function |
User defined function. More... |
static Function* gridripper::math::expr::Evaluator::createFunction | ( | const string & | expr, | |
const string & | varname, | |||
const tvector< StkOp * > & | stkops = *(const tvector< StkOp * > *) 0 , |
|||
const tvector< Function * > & | depvars = *(const tvector< Function * > *) 0 | |||
) | throw (IllegalArgumentException&) [static] |
Creates a function from the specified string.
expr | the expression | |
varname | name of the independent variable | |
stkops | additional constants and variables | |
depvars | additional dependent variables |
static StkConst* gridripper::math::expr::Evaluator::addConst | ( | const string & | def, | |
tvector< StkOp * > | stkops | |||
) | throw (IllegalArgumentException&) [static] |
Creates a constant and adds it to the list.
def | the variable definition | |
stkops | list of constants and other stack operations |
static void gridripper::math::expr::Evaluator::addConsts | ( | const string & | defs, | |
tvector< StkOp * > & | stkops | |||
) | throw (IllegalArgumentException&) [static] |
Creates constants from the definitions in the specified string.
Each definition must end with a semicolon.
stkops | list of constants and other stack operations | |
defs | the variable definitions |
static int gridripper::math::expr::Evaluator::findStkOp | ( | const tvector< StkOp * > & | stkops, | |
const string & | name | |||
) | [static] |
Finds the stack operation with the specified name in the list.
stkops | list of stack operations | |
name | name of stack operation to find |
static Function* gridripper::math::expr::Evaluator::addVar | ( | const string & | def, | |
const string & | varname, | |||
const tvector< StkOp * > & | stkops, | |||
tvector< Function * > & | depvars | |||
) | throw (IllegalArgumentException&) [static] |
Creates a dependent variable and adds it to the list.
def | the variable definition | |
varname | name of the independent variable | |
stkops | list of constants and other stack operations | |
depvars | list of dependent variables |
static void gridripper::math::expr::Evaluator::addVars | ( | const string & | defs, | |
const string & | varname, | |||
tvector< StkOp * > & | stkops, | |||
tvector< Function * > & | depvars | |||
) | throw (IllegalArgumentException&) [static] |
Creates dependent variables from the definitions in the specified string.
Each definition must end with a semicolon.
defs | the variable definitions | |
varname | name of the independent variable | |
stkops | list of constants and other stack operations | |
depvars | list of dependent variables |
static void gridripper::math::expr::Evaluator::addConstsAndVars | ( | const string & | defs, | |
const string & | varname, | |||
tvector< StkOp * > & | stkops, | |||
tvector< Function * > & | depvars | |||
) | throw (IllegalArgumentException&) [static] |
Creates constants and dependent variables from the definitions in the specified string.
Each definition must end with a semicolon.
defs | the variable definitions | |
varname | name of the independent variable | |
stkops | list of constants and other stack operations | |
depvars | list of dependent variables |
static int gridripper::math::expr::Evaluator::findFunction | ( | const tvector< Function * > & | funcs, | |
const string & | name | |||
) | [static] |
Finds the function with the specified name in the list.
funcs | list of functions | |
name | name of the function to find |
static GReal_t gridripper::math::expr::Evaluator::eval | ( | const string & | expr, | |
const tvector< StkOp * > & | stkops = *(const tvector< StkOp * > *) 0 | |||
) | throw (IllegalArgumentException&) [static] |
Evaluates the specified expression.
expr | the expression | |
stkops | list of constants and other stack operations |