![]() |
KIDS
ver-0.0.1
KIDS : Kernel Integrated Dynamics Simulator
|
A class representing a mathematical expression. More...
#include <Expression.h>

Public Member Functions | |
| T | evaluate (T *data) |
| Evaluate the expression with given variable values. | |
Static Public Member Functions | |
| static std::vector< Expression< T > > & | getExpressions () |
| Get the list of registered expressions. | |
| static int | registerExpression (const std::string &expression, const std::vector< std::string > &variables) |
| Register a new mathematical expression. | |
Private Member Functions | |
| Expression (const std::string &expressionStr, const std::vector< std::string > &varsStr) | |
| Private constructor to initialize the expression. | |
| T | _evaluate (T *data) |
Private Attributes | |
| std::string | expressionString |
| The mathematical expression string. | |
| std::string | variablesString |
| List of variables in the expression. | |
| FunctionParserBase< T > | parser |
| The parser for the expression. | |
A class representing a mathematical expression.
This class allows registration, storage, and evaluation of mathematical expressions.
| T | The data type of the expression (e.g., float, double, complex) |
Definition at line 50 of file Expression.h.
|
inlineprivate |
Private constructor to initialize the expression.
| expressionStr | The mathematical expression string. |
| varsStr | The list of variables in the expression. |
Definition at line 127 of file Expression.h.
References PROJECT_NS::Expression< T >::expressionString, PROJECT_NS::Expression< T >::parser, and PROJECT_NS::Expression< T >::variablesString.
|
inlineprivate |
Definition at line 137 of file Expression.h.
References PROJECT_NS::Expression< T >::parser.
Referenced by PROJECT_NS::Expression< T >::evaluate().

|
inline |
Evaluate the expression with given variable values.
| data | An array containing values of variables. |
Definition at line 85 of file Expression.h.
References PROJECT_NS::Expression< T >::_evaluate().
Referenced by PROJECT_NS::einsum_fun().


|
inlinestatic |
Get the list of registered expressions.
Definition at line 57 of file Expression.h.
Referenced by PROJECT_NS::RuleEvaluator::calculateResult(), and PROJECT_NS::Expression< T >::registerExpression().

|
inlinestatic |
Register a new mathematical expression.
| expression | The mathematical expression string. |
| variables | The list of variables in the expression. |
Definition at line 69 of file Expression.h.
References PROJECT_NS::Expression< T >::getExpressions().
Referenced by PROJECT_NS::RuleEvaluator::RuleEvaluator().


|
private |
The mathematical expression string.
Definition at line 117 of file Expression.h.
Referenced by PROJECT_NS::Expression< T >::Expression().
|
private |
The parser for the expression.
Definition at line 119 of file Expression.h.
Referenced by PROJECT_NS::Expression< T >::_evaluate(), and PROJECT_NS::Expression< T >::Expression().
|
private |
List of variables in the expression.
Definition at line 118 of file Expression.h.
Referenced by PROJECT_NS::Expression< T >::Expression().