Mathematical expression evaluated with the shunting yard algorithm, used in yields and outputs.
More...
#include <FMTExpression.h>
Mathematical expression evaluated with the shunting yard algorithm, used in yields and outputs.
◆ FMTExpression() [1/3]
| Core::FMTExpression::FMTExpression |
( |
| ) |
|
◆ FMTExpression() [2/3]
| Core::FMTExpression::FMTExpression |
( |
const std::vector< std::string > & |
lsources | ) |
|
Construct a FMTExpression from a vector of tokens.
- Parameters
-
| [in] | lsources | the tokens of the expression. |
◆ FMTExpression() [3/3]
◆ ~FMTExpression()
| Core::FMTExpression::~FMTExpression |
( |
| ) |
|
|
default |
◆ getInFix()
| std::vector< std::string > Core::FMTExpression::getInFix |
( |
| ) |
const |
Return the infix expression.
- Returns
- the infix expression.
◆ getVariables()
| std::vector< std::string > Core::FMTExpression::getVariables |
( |
| ) |
const |
Return the variables of the expression.
- Returns
- the variables of the expression.
◆ operator std::string()
| Core::FMTExpression::operator std::string |
( |
| ) |
const |
Convert the expression to its string representation.
- Returns
- the string representation of the expression.
◆ operator=()
◆ shuntingYard()
| double Core::FMTExpression::shuntingYard |
( |
const std::map< std::string, double > & |
mapping | ) |
const |
Evaluate the expression using the shunting yard algorithm.
- Parameters
-
| [in] | mapping | the values of the variables. |
- Returns
- the value of the expression.
◆ simplify()
| FMTExpression Core::FMTExpression::simplify |
( |
std::map< std::string, double > & |
values | ) |
const |
Return a simplified expression using the given variable values.
- Parameters
-
| [in,out] | values | the values of the variables. |
- Returns
- the simplified expression.
The documentation for this class was generated from the following file: