C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html

This commit is contained in:
Arash Partow
2014-07-01 20:46:51 +10:00
parent 7d798d0dec
commit f0525af667
6 changed files with 334 additions and 195 deletions

View File

@ -29,10 +29,10 @@ void vector_function()
typedef exprtk::parser<T> parser_t;
std::string expression_string =
" for (i := 0; i < min(x[],y[],z[]); i += 1) "
" { "
" z[i] := 3sin(x[i]) + 2log(y[i]); "
" } ";
" for (var i := 0; i < min(x[],y[],z[]); i += 1) "
" { "
" z[i] := 3sin(x[i]) + 2log(y[i]); "
" } ";
T x[] = { T(1.1), T(2.2), T(3.3), T(4.4), T(5.5) };
T y[] = { T(1.1), T(2.2), T(3.3), T(4.4), T(5.5) };