25 #include <Eigen/Dense> 26 #include "Expression.h" 30 template<
typename T>
class Array;
59 Constant(
double value0,
double value1);
73 Constant(
double value0,
double value1,
double value2);
88 std::vector<double> values);
115 operator double()
const;
121 std::vector<double>
values()
const;
127 void eval(Eigen::Ref<Eigen::VectorXd> values,
128 Eigen::Ref<const Eigen::VectorXd> x)
const override;
130 virtual std::string
str(
bool verbose)
const override;
135 std::vector<double> _values;
~Constant()
Destructor.
Definition: Constant.cpp:71
virtual std::vector< std::size_t > value_shape() const override
Definition: Expression.cpp:119
Definition: Expression.h:49
void eval(Array< double > &values, const Array< double > &x) const override
Definition: Constant.cpp:130
std::vector< double > values() const
Definition: Constant.cpp:124
Constant(double value)
Definition: Constant.cpp:29
This class represents a constant-valued expression.
Definition: Constant.h:35
const Constant & operator=(const Constant &constant)
Definition: Constant.cpp:76
virtual std::string str(bool verbose) const override
Return informal string representation (pretty-print)
Definition: Constant.cpp:143