20template <
typename Scalar,
typename Base = StageFunctionTpl<Scalar>>
23template <
typename Scalar>
34 std::vector<int>
const &
indices)
41 void evaluate(
const ConstVectorRef &x,
const ConstVectorRef &u,
53 const ConstVectorRef &u,
54 const ConstVectorRef &lbda,
60 return std::make_shared<Data>(*
this);
64template <
typename Scalar>
75 std::vector<int>
const &
indices)
93 const ConstVectorRef &lbda,
99 return std::make_shared<Data>(*
this);
103template <
typename Scalar>
111 template <
typename Base>
135 template <
typename... Args>
138 template <
typename... Args>
141 template <
typename... Args>
143 const ConstVectorRef &lbda,
144 Args &&...args)
const;
150#include "aligator/modelling/function-xpr-slice.hxx"
152#ifdef ALIGATOR_ENABLE_TEMPLATE_INSTANTIATION
153#include "aligator/modelling/function-xpr-slice.txx"
Base definitions for ternary functions.
ALIGATOR_DYNAMIC_TYPEDEFS(Scalar)
shared_ptr< BaseData > sub_data
FunctionSliceDataTpl(FunctionSliceXprTpl< Scalar, Base > const &obj)
StageFunctionDataTpl< Scalar > BaseData
Base residual's data object.
FunctionSliceXprTpl(xyz::polymorphic< Base > func, const int idx)
void computeVectorHessianProducts(const ConstVectorRef &x, const ConstVectorRef &u, const ConstVectorRef &lbda, BaseData &data) const override
Compute the vector-hessian products of this function.
StageFunctionTpl< Scalar > Base
FunctionSliceDataTpl< Scalar > Data
shared_ptr< BaseData > createData() const override
Instantiate a Data object.
void evaluate(const ConstVectorRef &x, const ConstVectorRef &u, BaseData &data) const override
Evaluate the function.
void computeJacobians(const ConstVectorRef &x, const ConstVectorRef &u, BaseData &data) const override
Compute Jacobians of this function.
ALIGATOR_DYNAMIC_TYPEDEFS(Scalar)
FunctionSliceXprTpl(xyz::polymorphic< Base > func, std::vector< int > const &indices)
StageFunctionDataTpl< Scalar > BaseData
detail::slice_impl_tpl< StageFunctionTpl< Scalar > > SliceImpl
ALIGATOR_UNARY_FUNCTION_INTERFACE(Scalar)
void computeJacobians(const ConstVectorRef &x, BaseData &data) const override
detail::slice_impl_tpl< UnaryFunctionTpl< Scalar > > SliceImpl
StageFunctionDataTpl< Scalar > BaseData
FunctionSliceXprTpl(xyz::polymorphic< Base > func, const int idx)
ALIGATOR_DYNAMIC_TYPEDEFS(Scalar)
void evaluate(const ConstVectorRef &x, BaseData &data) const override
FunctionSliceDataTpl< Scalar > Data
void computeVectorHessianProducts(const ConstVectorRef &x, const ConstVectorRef &lbda, BaseData &data) const override
FunctionSliceXprTpl(xyz::polymorphic< Base > func, std::vector< int > const &indices)
shared_ptr< BaseData > createData() const override
Instantiate a Data object.
Represents a function of which the output is a subset of another function, for instance where is gi...
Base struct for function data.
StageFunctionDataTpl(const int ndx, const int nu, const int nr)
StageFunctionTpl(const int ndx, const int nu, const int nr)
Represents unary functions of the form , with no control (or next-state) arguments.
StageFunctionTpl< Scalar > Base
Slicing and indexing of a function's output.
slice_impl_tpl(xyz::polymorphic< Base > func, std::vector< int > const &indices)
void computeJacobians_impl(BaseData &data, Args &&...args) const
FunctionSliceDataTpl< Scalar > Data
typename StageFunctionTpl< Scalar >::Scalar Scalar
xyz::polymorphic< StageFunctionTpl< Scalar > > func
StageFunctionDataTpl< Scalar > BaseData
void evaluate_impl(BaseData &data, Args &&...args) const
void computeVectorHessianProducts_impl(BaseData &data, const ConstVectorRef &lbda, Args &&...args) const
ALIGATOR_DYNAMIC_TYPEDEFS(Scalar)
slice_impl_tpl(xyz::polymorphic< Base > func, int idx)
std::vector< int > indices