#include <Tokenizer_exprtk.hpp>
◆ Tokenizer_exprtk()
Aqua::Tokenizer_exprtk::Tokenizer_exprtk |
( |
| ) |
|
◆ ~Tokenizer_exprtk()
Aqua::Tokenizer_exprtk::~Tokenizer_exprtk |
( |
| ) |
|
◆ exprVariables()
std::vector< std::string > Aqua::Tokenizer_exprtk::exprVariables |
( |
const std::string | eq | ) |
|
Get the list of variables used on an mathematical expression.
- Parameters
-
eq | Math expression to solve. |
- Returns
- List of variable names
◆ registerVariable()
void Aqua::Tokenizer_exprtk::registerVariable |
( |
const std::string | name, |
|
|
T | value ) |
|
inline |
Register a variable.
In case that the variable already exist, it will be modified.
The registered variables can be used later in the expression to be evaluated.
- Parameters
-
name | Name of the variable. |
value | Value of the variable. |
- Returns
- true if the variable already exists, false otherwise.
◆ removeVariable()
void Aqua::Tokenizer_exprtk::removeVariable |
( |
const std::string | name | ) |
|
|
inlineprotected |
Remove a variable if it has been registered.
- Parameters
-
◆ solve()
template<typename
T = float>
T Aqua::Tokenizer_exprtk::solve |
( |
const std::string | eq | ) |
|
|
inline |
Solve a math expression.
- Parameters
-
eq | Math expression to solve. |
- Returns
- Expression value, 0.0 if the evaluation failed (it will be reported by terminal).
The documentation for this class was generated from the following files: