aligator
0.9.0
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
|
Stage costs \( \ell(x, u) \) for control problems. More...
#include <aligator/core/cost-abstract.hpp>
Public Types | |
using | Scalar = _Scalar |
using | CostData = CostDataAbstractTpl<Scalar> |
using | Manifold = ManifoldAbstractTpl<Scalar> |
Public Member Functions | |
ALIGATOR_DYNAMIC_TYPEDEFS (Scalar) | |
int | nx () const |
int | ndx () const |
template<class U > | |
CostAbstractTpl (U &&space, const int nu) | |
virtual void | evaluate (const ConstVectorRef &x, const ConstVectorRef &u, CostData &data) const |
Evaluate the cost function. | |
virtual void | computeGradients (const ConstVectorRef &x, const ConstVectorRef &u, CostData &data) const |
Compute the cost gradients \((\ell_x, \ell_u)\). | |
virtual void | computeHessians (const ConstVectorRef &x, const ConstVectorRef &u, CostData &data) const |
Compute the cost Hessians \((\ell_{ij})_{i,j \in \{x,u\}}\). | |
virtual shared_ptr< CostData > | createData () const |
virtual | ~CostAbstractTpl ()=default |
Public Attributes | |
xyz::polymorphic< Manifold > | space |
State dimension. | |
int | nu |
Control dimension. | |
Stage costs \( \ell(x, u) \) for control problems.
using aligator::CostAbstractTpl< Scalar >::Scalar = _Scalar |
Definition at line 14 of file cost-abstract.hpp.
using aligator::CostAbstractTpl< Scalar >::CostData = CostDataAbstractTpl<Scalar> |
Definition at line 16 of file cost-abstract.hpp.
using aligator::CostAbstractTpl< Scalar >::Manifold = ManifoldAbstractTpl<Scalar> |
Definition at line 17 of file cost-abstract.hpp.
|
inline |
Definition at line 28 of file cost-abstract.hpp.
|
virtualdefault |
aligator::CostAbstractTpl< Scalar >::ALIGATOR_DYNAMIC_TYPEDEFS | ( | Scalar | ) |
|
inline |
Definition at line 24 of file cost-abstract.hpp.
|
inline |
Definition at line 25 of file cost-abstract.hpp.
|
virtual |
Evaluate the cost function.
Reimplemented in aligator::autodiff::CostFiniteDifferenceHelper< Scalar >, aligator::LogResidualCostTpl< Scalar >, aligator::python::PyCostFunction, and aligator::QuadraticResidualCostTpl< Scalar >.
Definition at line 51 of file cost-abstract.hpp.
|
virtual |
Compute the cost gradients \((\ell_x, \ell_u)\).
Reimplemented in aligator::autodiff::CostFiniteDifferenceHelper< Scalar >, aligator::LogResidualCostTpl< Scalar >, aligator::python::PyCostFunction, and aligator::QuadraticResidualCostTpl< Scalar >.
Definition at line 58 of file cost-abstract.hpp.
|
virtual |
Compute the cost Hessians \((\ell_{ij})_{i,j \in \{x,u\}}\).
Reimplemented in aligator::autodiff::CostFiniteDifferenceHelper< Scalar >, aligator::LogResidualCostTpl< Scalar >, aligator::python::PyCostFunction, and aligator::QuadraticResidualCostTpl< Scalar >.
Definition at line 65 of file cost-abstract.hpp.
|
inlinevirtual |
Reimplemented in aligator::autodiff::CostFiniteDifferenceHelper< Scalar >, aligator::compat::croc::CrocCostModelWrapperTpl< Scalar >, aligator::ConstantCostTpl< _Scalar >, aligator::CostStackTpl< _Scalar >, aligator::DirectSumCostTpl< _Scalar >, aligator::LogResidualCostTpl< Scalar >, aligator::python::PyCostFunction, aligator::QuadraticCostTpl< _Scalar >, aligator::QuadraticResidualCostTpl< _Scalar >, and aligator::QuadraticResidualCostTpl< Scalar >.
Definition at line 43 of file cost-abstract.hpp.
xyz::polymorphic<Manifold> aligator::CostAbstractTpl< Scalar >::space |
State dimension.
Definition at line 20 of file cost-abstract.hpp.
int aligator::CostAbstractTpl< Scalar >::nu |
Control dimension.
Definition at line 22 of file cost-abstract.hpp.