C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html
This commit is contained in:
parent
bc532593ba
commit
654bf59c36
13
exprtk.hpp
13
exprtk.hpp
|
@ -2892,10 +2892,12 @@ namespace exprtk
|
||||||
{
|
{
|
||||||
token t;
|
token t;
|
||||||
|
|
||||||
while (join(g.token_list_[i],g.token_list_[i + 1],t))
|
while (join(g[i],g[i + 1],t))
|
||||||
{
|
{
|
||||||
g.token_list_[i] = t;
|
g.token_list_[i] = t;
|
||||||
|
|
||||||
g.token_list_.erase(g.token_list_.begin() + (i + 1));
|
g.token_list_.erase(g.token_list_.begin() + (i + 1));
|
||||||
|
|
||||||
++changes;
|
++changes;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2914,9 +2916,10 @@ namespace exprtk
|
||||||
{
|
{
|
||||||
token t;
|
token t;
|
||||||
|
|
||||||
while (join(g.token_list_[i],g.token_list_[i + 1],g.token_list_[i + 2],t))
|
while (join(g[i],g[i + 1],g[i + 2],t))
|
||||||
{
|
{
|
||||||
g.token_list_[i] = t;
|
g.token_list_[i] = t;
|
||||||
|
|
||||||
g.token_list_.erase(g.token_list_.begin() + (i + 1),
|
g.token_list_.erase(g.token_list_.begin() + (i + 1),
|
||||||
g.token_list_.begin() + (i + 3));
|
g.token_list_.begin() + (i + 3));
|
||||||
++changes;
|
++changes;
|
||||||
|
@ -33721,9 +33724,9 @@ namespace exprtk
|
||||||
namespace information
|
namespace information
|
||||||
{
|
{
|
||||||
static const char* library = "Mathematical Expression Toolkit";
|
static const char* library = "Mathematical Expression Toolkit";
|
||||||
static const char* version = "2.71828182845904523536028747135266"
|
static const char* version = "2.718281828459045235360287471352662"
|
||||||
"2497757247093699959574966967627724";
|
"49775724709369995957496696762772407";
|
||||||
static const char* date = "20160113";
|
static const char* date = "20160606";
|
||||||
|
|
||||||
static inline std::string data()
|
static inline std::string data()
|
||||||
{
|
{
|
||||||
|
|
10
readme.txt
10
readme.txt
|
@ -1639,11 +1639,11 @@ expression, an instance of each function needs to be registered with a
|
||||||
symbol_table that has been associated with the expression instance.
|
symbol_table that has been associated with the expression instance.
|
||||||
The following demonstrates how all the pieces are put together:
|
The following demonstrates how all the pieces are put together:
|
||||||
|
|
||||||
typedef exprtk::symbol_table<double> symbol_table_t;
|
typedef exprtk::symbol_table<double> symbol_table_t;
|
||||||
typedef exprtk::expression<double> expression_t;
|
typedef exprtk::expression<double> expression_t;
|
||||||
typedef exprtk::parser<double> parser_t;
|
typedef exprtk::parser<double> parser_t;
|
||||||
typedef exprtk::function_compositor<T> compositor_t;
|
typedef exprtk::function_compositor<double> compositor_t;
|
||||||
typedef typename compositor_t::function function_t;
|
typedef typename compositor_t::function function_t;
|
||||||
|
|
||||||
foo<double> f;
|
foo<double> f;
|
||||||
boo<double> b;
|
boo<double> b;
|
||||||
|
|
Loading…
Reference in New Issue