10 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
22 const ConstVectorRef d);
24 void evaluate(
const ConstVectorRef &x,
const ConstVectorRef &u,
25 Data &data)
const override {
27 data.value_.noalias() +=
A_ * x;
28 data.value_.noalias() +=
B_ * u;
37 Data &data)
const override {
45 auto data = std::make_shared<Data>(this->
ndx1, this->
nu, this->
nr);
52template <
typename Scalar>
64template <
typename Scalar>
66 const ConstMatrixRef B,
67 const ConstVectorRef d)
68 :
Base((int)A.cols(), (int)B.cols(), (int)d.rows())
72 assert((
A_.rows() ==
d_.rows()) && (
B_.rows() ==
d_.rows()) &&
73 "Number of rows not consistent.");
Base definitions for ternary functions.
void computeJacobians(const ConstVectorRef &, const ConstVectorRef &, Data &data) const override
Compute Jacobians of this function.
StageFunctionTpl< Scalar > Base
virtual shared_ptr< Data > createData() const override
Instantiate a Data object.
void evaluate(const ConstVectorRef &x, const ConstVectorRef &u, Data &data) const override
Evaluate the function.
LinearFunctionTpl(const int ndx, const int nu, const int nr)
StageFunctionDataTpl< Scalar > Data
ALIGATOR_DYNAMIC_TYPEDEFS(Scalar)
Base struct for function data.
StageFunctionTpl(const int ndx, const int nu, const int nr)