C++ Mathematical Expression Library (ExprTk) http://www.partow.net/programming/exprtk/index.html
This commit is contained in:
parent
5fbbe49c96
commit
d86f6da090
|
@ -28,7 +28,7 @@ struct myfunc : public exprtk::ifunction<T>
|
|||
|
||||
myfunc()
|
||||
: exprtk::ifunction<T>(2)
|
||||
{}
|
||||
{ exprtk::disable_has_side_effects(*this); }
|
||||
|
||||
inline T operator()(const T& v1, const T& v2)
|
||||
{
|
||||
|
|
|
@ -47,7 +47,7 @@ void bubble_sort()
|
|||
" upper_bound -= 1; "
|
||||
" until (not(swapped) or (upper_bound == 0)); ";
|
||||
|
||||
T v[] = { T(2.2), T(1.1), T(5.5), T(4.4), T(3.3) };
|
||||
T v[] = { T(9.9), T(2.2), T(1.1), T(5.5), T(7.7), T(4.4), T(3.3) };
|
||||
|
||||
symbol_table_t symbol_table;
|
||||
symbol_table.add_vector("v",v);
|
||||
|
|
|
@ -61,7 +61,6 @@ void black_scholes_merton_model()
|
|||
expression.register_symbol_table(symbol_table);
|
||||
|
||||
parser_t parser;
|
||||
|
||||
parser.compile(bsm_model_program,expression);
|
||||
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue