4#include <proxsuite-nlp/third-party/polymorphic_cxx14.hpp>
8template <
typename Scalar>
struct CentroidalWrapperDataTpl;
16template <
typename _Scalar>
22 using FunPtr = xyz::polymorphic<StageFunctionTpl<Scalar>>;
27 :
Base(centroidal_cost->
ndx1 + centroidal_cost->
nu, centroidal_cost->
nu,
36 return std::make_shared<Data>(
this);
42template <
typename Scalar>
44 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
54#ifdef ALIGATOR_ENABLE_TEMPLATE_INSTANTIATION
55#include "aligator/modelling/centroidal/centroidal-wrapper.txx"
CentroidalWrapperDataTpl(const CentroidalWrapperResidualTpl< Scalar > *model)
shared_ptr< Base > wrapped_data_
This residual acts as a wrapper for centroidal model cost functions in which the external forces are ...
ALIGATOR_UNARY_FUNCTION_INTERFACE(Scalar)
typename Base::Data BaseData
ALIGATOR_DYNAMIC_TYPEDEFS(Scalar)
shared_ptr< BaseData > createData() const
Instantiate a Data object.
void evaluate(const ConstVectorRef &x, BaseData &data) const
CentroidalWrapperResidualTpl(FunPtr centroidal_cost)
void computeJacobians(const ConstVectorRef &x, BaseData &data) const
xyz::polymorphic< StageFunctionTpl< Scalar > > FunPtr
Base struct for function data.
StageFunctionDataTpl< _Scalar > Data
Represents unary functions of the form , with no control (or next-state) arguments.