7#include <proxsuite-nlp/manifold-base.hpp>
8#include <proxsuite-nlp/third-party/polymorphic_cxx14.hpp>
20 xyz::polymorphic<Manifold>
space;
32 virtual void evaluate(
const ConstVectorRef &x,
const ConstVectorRef &u,
37 const ConstVectorRef &u,
CostData &data)
const;
44 return std::make_shared<CostData>(
ndx(),
nu);
50template <
typename Scalar>
52 const ConstVectorRef &,
57template <
typename Scalar>
59 const ConstVectorRef &,
64template <
typename Scalar>
66 const ConstVectorRef &,
112#ifdef ALIGATOR_ENABLE_TEMPLATE_INSTANTIATION
113#include "aligator/core/cost-abstract.txx"
#define ALIGATOR_RUNTIME_ERROR(...)
Stage costs for control problems.
xyz::polymorphic< Manifold > space
virtual shared_ptr< CostData > createData() const
virtual void evaluate(const ConstVectorRef &x, const ConstVectorRef &u, CostData &data) const
Evaluate the cost function.
CostAbstractTpl(U &&space, const int nu)
ManifoldAbstractTpl< Scalar > Manifold
CostDataAbstractTpl< Scalar > CostData
ALIGATOR_DYNAMIC_TYPEDEFS(Scalar)
virtual void computeGradients(const ConstVectorRef &x, const ConstVectorRef &u, CostData &data) const
Compute the cost gradients .
virtual void computeHessians(const ConstVectorRef &x, const ConstVectorRef &u, CostData &data) const
Compute the cost Hessians .
virtual ~CostAbstractTpl()=default
Data struct for CostAbstractTpl.
CostDataAbstractTpl(const int ndx, const int nu)
CostDataAbstractTpl(const CostAbstractTpl< Scalar > &cost)
ALIGATOR_DYNAMIC_TYPEDEFS(Scalar)
virtual ~CostDataAbstractTpl()=default
CostAbstractTpl(U &&space, const int nu)