|
Biorbd Release_1.13.0
|
Strings that are to be interpreted as equation that can be evaluated. More...
#include <Equation.h>
Public Member Functions | |
| Equation () | |
| Construct Equation. | |
| Equation (const char *string) | |
| Construct Equation. | |
| Equation (const String &string) | |
| Construct Equation. | |
| Equation (const std::basic_string< char > &string) | |
| Construct Equation. | |
| Public Member Functions inherited from BIORBD_NAMESPACE::utils::String | |
| String () | |
| Construct string. | |
| String (const char *text) | |
| Construct string. | |
| String (const String &text) | |
| Construct string. | |
| String (const std::basic_string< char > &text) | |
| Construct string. | |
| String & | operator= (const String &other) |
| Allow to use operator=. | |
| String | operator+ (size_t val) |
| Append an unsigned int to the string. | |
| String | operator+ (int val) |
| Append an int to the string. | |
| String | operator+ (double val) |
| Append a double to the string. | |
| String | operator+ (const char *text) |
| Append a char to the string. | |
| String | operator() (size_t idx) const |
| Get a specific character in the string. | |
| String | operator() (size_t startIdx, size_t lastIdx) const |
| Extract a portion of the string. | |
| virtual | ~String () |
| Destroy class properly. | |
| String | tolower () const |
| Return a lower case string. | |
| String | toupper () const |
| Return an upper case string. | |
Static Public Member Functions | |
| static std::vector< Equation > | splitIntoEquation (Equation wholeEq, const std::map< Equation, double > &variables) |
| Split equation into smaller parts, down to number or math symbols. | |
| static double | evaluateEquation (std::vector< Equation > wholeEq) |
| Evaluate and return an equation. | |
| static double | evaluateEquation (Equation wholeEq) |
| Evaluate and return an equation. | |
| static double | evaluateEquation (Equation wholeEq, const std::map< Equation, double > &variables) |
| Evaluate and return an equation. | |
| static void | replaceCste (std::vector< Equation > &eq) |
| Replace constants in the split equation by a number. | |
| static void | replaceVar (Equation &eq, const std::map< Equation, double > &variables) |
| Replace the varirables in the equation by their values. | |
| Static Public Member Functions inherited from BIORBD_NAMESPACE::utils::String | |
| static String | tolower (const String &str) |
| Convert a string to a lower case string. | |
| static String | toupper (const String &str) |
| Convert a string to a upper case string. | |
| static String | to_string (double val) |
| Overload of the to_string C++11 function to allow for X-digits precision. | |
| static String | to_string (float val) |
| Overload of the to_string C++11 function to allow for X-digits precision. | |
| static String | removeTrailing (const String &origin, const String &trailTag) |
| The trailing tags of a string. | |
Static Protected Member Functions | |
| static double | evaluateEquation (std::vector< Equation > eq, size_t math) |
| Resolve the equation. | |
| static std::vector< Equation > | prepareMathSymbols () |
| Prepare the mathematical symbols. | |
Strings that are to be interpreted as equation that can be evaluated.
Definition at line 17 of file Equation.h.
| utils::Equation::Equation | ( | ) |
Construct Equation.
Definition at line 28 of file Equation.cpp.
| utils::Equation::Equation | ( | const char * | string | ) |
Construct Equation.
| string | The equation in a char format |
Definition at line 30 of file Equation.cpp.
| utils::Equation::Equation | ( | const String & | string | ) |
Construct Equation.
| string | The equation in a string format |
Definition at line 32 of file Equation.cpp.
| utils::Equation::Equation | ( | const std::basic_string< char > & | string | ) |
Construct Equation.
| string | The equation in a list of char format |
Definition at line 34 of file Equation.cpp.
|
static |
Evaluate and return an equation.
| wholeEq | The whole equation to evaluate |
Definition at line 244 of file Equation.cpp.
|
static |
Evaluate and return an equation.
| wholeEq | The whole equation to evaluate |
| variables | The variables in the equation |
Definition at line 239 of file Equation.cpp.
|
staticprotected |
Resolve the equation.
| eq | The equation to resolve |
| math | The mathematical symbol that is being evaluated now |
Definition at line 153 of file Equation.cpp.
|
static |
Evaluate and return an equation.
| wholeEq | The already split equation to evaluate |
Definition at line 149 of file Equation.cpp.
|
staticprotected |
Prepare the mathematical symbols.
The supported symbols are:
Definition at line 14 of file Equation.cpp.
|
static |
Replace constants in the split equation by a number.
| eq | The split equation |
The supported constants are:
Definition at line 130 of file Equation.cpp.
|
static |
Replace the varirables in the equation by their values.
| eq | The equation to replace the variables |
| variables | The variable set |
Definition at line 137 of file Equation.cpp.
|
static |
Split equation into smaller parts, down to number or math symbols.
| wholeEq | The whole equation to split |
| variables | The set of variables in the equation |
Definition at line 37 of file Equation.cpp.