OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
|
#include <Expression.h>
Public Member Functions | |
Expression () | |
Expression (std::string expr) | |
Expression (std::string expr, functionDictionary_t known_expr_funcs) | |
virtual | ~Expression () |
std::set< std::string > | getReqVars () const |
std::set< std::string > | getReqFuncs () const |
std::string | toString () const |
functionDictionary_t | getRegFuncs () const |
Expressions::OperatorType_t | getOpType () const |
get operator type present (if expression is constraint) More... | |
Expressions::Result_t | evaluate (variableDictionary_t vars) |
evaluate an expression given a value dictionary of free variables More... | |
Private Types | |
typedef std::string::const_iterator | iterator_type |
Private Member Functions | |
void | determineConstrOperator () |
void | parse () |
Private Attributes | |
client::ast::expression | ast_ |
std::set< std::string > | vars_ |
std::set< std::string > | funcs_ |
std::string | expr_ |
functionDictionary_t | known_expr_funcs_ |
Expressions::OperatorType_t | type_ |
Definition at line 94 of file Expression.h.
|
private |
Definition at line 155 of file Expression.h.
|
inline |
Definition at line 98 of file Expression.h.
|
inline |
Definition at line 101 of file Expression.h.
References determineConstrOperator(), known_expr_funcs_, and parse().
|
inline |
Definition at line 110 of file Expression.h.
References determineConstrOperator(), known_expr_funcs_, and parse().
|
inlinevirtual |
Definition at line 120 of file Expression.h.
|
inlineprivate |
Definition at line 166 of file Expression.h.
References Expressions::EQ, expr_, Expressions::INEQ_LHS, Expressions::INEQ_LHS_EQ, Expressions::INEQ_RHS, Expressions::INEQ_RHS_EQ, Expressions::NONE, Expressions::NOT_EQ, and type_.
Referenced by Expression().
|
inline |
evaluate an expression given a value dictionary of free variables
Definition at line 133 of file Expression.h.
References ast_, end(), expr_, known_expr_funcs_, client::code_gen::StackEvaluator::registerFunctions(), client::code_gen::StackEvaluator::registerVariables(), and client::code_gen::StackEvaluator::result().
Referenced by Individual::checkConstraints(), and OpalSimulation::collectResults().
|
inline |
get operator type present (if expression is constraint)
Definition at line 130 of file Expression.h.
References type_.
|
inline |
Definition at line 127 of file Expression.h.
References known_expr_funcs_.
Referenced by OpalSimulation::collectResults().
|
inline |
Definition at line 125 of file Expression.h.
References funcs_.
|
inline |
Definition at line 124 of file Expression.h.
References vars_.
Referenced by Individual::checkConstraints(), and OpalSimulation::getVariableDictionary().
|
inlineprivate |
Definition at line 186 of file Expression.h.
References ast_, end(), endl(), expr_, funcs_, client::code_gen::requirements::functions(), client::code_gen::requirements::variables(), and vars_.
Referenced by Expression().
|
inline |
Definition at line 126 of file Expression.h.
References expr_.
Referenced by OpalSimulation::collectResults().
|
private |
Definition at line 156 of file Expression.h.
Referenced by evaluate(), and parse().
|
private |
Definition at line 161 of file Expression.h.
Referenced by determineConstrOperator(), evaluate(), parse(), and toString().
|
private |
Definition at line 159 of file Expression.h.
Referenced by getReqFuncs(), and parse().
|
private |
Definition at line 162 of file Expression.h.
Referenced by evaluate(), Expression(), and getRegFuncs().
|
private |
Definition at line 164 of file Expression.h.
Referenced by determineConstrOperator(), and getOpType().
|
private |
Definition at line 158 of file Expression.h.
Referenced by getReqVars(), and parse().