1#ifndef included_AMP_MathExpr
2#define included_AMP_MathExpr
5#include <initializer_list>
10#include "AMP/utils/tinyexpr/tinyexpr.h"
36 std::vector<std::string> variables = std::vector<std::string>() );
75 double operator()(
const std::initializer_list<double> &data = {} )
const;
A class used to evaluate math expressions.
double operator()(const double *data) const
Evaluate.
std::vector< std::string > d_vars
MathExpr(MathExpr &&rhs)
Move constructor.
double operator()(const std::initializer_list< double > &data={}) const
Evaluate.
MathExpr & operator=(MathExpr &&rhs)
Move assignment operator.
const auto & getExpr() const
Return the expression.
MathExpr(const MathExpr &)=delete
Copy constructor.
std::vector< double > d_data
bool operator==(const MathExpr &rhs) const
Check if two expressions are the same.
MathExpr(double value)
Scalar.
bool operator!=(const MathExpr &rhs) const
Check if two expressions are different.
std::vector< te_variable > d_tevar
MathExpr()
Empty constructor.
MathExpr & operator=(const MathExpr &)=delete
Assignment operator.
MathExpr(std::string expression, std::vector< std::string > variables=std::vector< std::string >())
Default constructor.
const auto & getVars() const
Return the variables.
MathExpr clone() const
Clone the expression.