10 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
27 const ConstVectorRef d)
28 :
Base((int)A.cols(), (int)B.cols(), (int)d.rows()),
A_(A),
B_(B),
d_(d) {
29 assert((
A_.rows() ==
d_.rows()) && (
B_.rows() ==
d_.rows()) &&
30 "Number of rows not consistent.");
33 void evaluate(
const ConstVectorRef &x,
const ConstVectorRef &u,
34 Data &data)
const override {
36 data.value_.noalias() +=
A_ * x;
37 data.value_.noalias() +=
B_ * u;
46 Data &data)
const override {
54 auto data = std::make_shared<Data>(this->
ndx1, this->
nu, this->
nr);
Base definitions for ternary functions.
void computeJacobians(const ConstVectorRef &, const ConstVectorRef &, Data &data) const override
Compute Jacobians of this function.
LinearFunctionTpl(const ConstMatrixRef A, const ConstMatrixRef B, const ConstVectorRef d)
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)
ALIGATOR_DYNAMIC_TYPEDEFS(Scalar)
Base struct for function data.
Class representing ternary functions .
const int nu
Control dimension.
const int nr
Function codimension.
const int ndx1
Current state dimension.