44 const std::string&
name()
const;
std::set< DExpression * > operandExprs
ExprVarRef * resolveVar(const std::string &name) const
const std::string & name() const
std::set< GlobalVal * > operandVars
abstract class for implementing variable references
EvaluationStrategy
Types of evaluation strategies that are available.
static EvaluationStrategy defaultEvaluationStrategy
What evaluation strategy to use by default.
VariableSetHandle getLoopVarSetHandle(VariableHandle vh)
const std::vector< double > & evalFP(ExprEvalHandle eeh)
void getErrors(std::vector< std::string > &errors) const
void setLoopVariable(VariableSetHandle handle, double *values, unsigned dim)
std::set< GlobalVal * > AllExternalVars
ExprEvalHandle getExprEvalHandle(ExprHandle eh)
void setLoopVariable(VariableSetHandle handle, double value)
void setVariable(VariableHandle handle, double value)
ExprHandle addExpression(const std::string &varName, ExprType seTy, const std::string &expr)
std::set< DExpression * > exprEvaled
const char * evalStr(ExprEvalHandle eeh)
std::set< DExpression * > exprToEval
void setVariable(VariableHandle handle, double *values, unsigned dim)
std::set< DExpression * > AllExprs
VariableHandle addExternalVariable(const std::string &variableName, ExprType seTy)
std::set< GlobalVal * >::iterator VariableSetHandle
std::set< GlobalVal * >::iterator VariableHandle
std::pair< ExprHandle, std::vector< DExpression * > > ExprEvalHandle
std::set< DExpression * >::iterator ExprHandle
</pre >< h3 > Binding our variable reference</h3 > If we now tried to use the variable would still not be found by our expressions To make it bindable we need to override the resolveVar() function as follows</pre >< h3 > Variable setting</h3 > Next we need to make a way of setting the variable As the controlling code will use the expression it will repeatedly alternate between setting the independent variables that are used and calling evaluate(). What it has to do depends very much on the application. In this case we only need to set the independent variable x as</pre >< h2 > Evaluating expressions</h2 > Evaluating an expression is pretty easy But before we can do that we need to make an instance< pre > GrapherExpr expr("x+x^2")
For any rgb or hsl value(except for negative s values)