4 #include <nlohmann/json.hpp> 7 template <
typename T>
class parser;
17 template <std::
floating_po
int T =
double>
class ExprFunction 19 std::shared_ptr<exprtk::parser<T>>
parser;
20 std::shared_ptr<exprtk::expression<T>>
expression;
21 std::shared_ptr<exprtk::symbol_table<T>> symbols;
22 typedef std::vector<std::pair<std::string, T*>> Tvarvec;
23 typedef std::vector<std::pair<std::string, T>> Tconstvec;
26 void set(
const std::string& exprstr,
const Tvarvec& vars = {},
const Tconstvec& consts = {});
27 void set(
const nlohmann::json&,
const Tvarvec& vars = {});
29 T derivative(T& variable)
const;
Definition: functionparser.h:9
Definition: functionparser.h:7
Since parser<T> is non-copyable we instantiate it with a shared pointer, allowing ExprFunction to be ...
Definition: externalpotential.h:9
Definition: functionparser.h:6
Definition: functionparser.h:8