|
aligator
0.16.0
A versatile and efficient C++ library for real-time constrained trajectory optimization.
|
Quadratic composite of an underlying function. More...
#include <aligator/modelling/costs/quad-residual-cost.hpp>
Public Types | |
| using | Scalar = _Scalar |
| using | Base = CostAbstractTpl<Scalar> |
| using | CostData = CostDataAbstractTpl<Scalar> |
| using | Data = CompositeCostDataTpl<Scalar> |
| using | StageFunction = StageFunctionTpl<Scalar> |
| using | Manifold = ManifoldAbstractTpl<Scalar> |
Public Types inherited from aligator::CostAbstractTpl< _Scalar > | |
| using | Scalar = _Scalar |
| using | CostData = CostDataAbstractTpl<Scalar> |
| using | Manifold = ManifoldAbstractTpl<Scalar> |
Public Member Functions | |
| ALIGATOR_DYNAMIC_TYPEDEFS (Scalar) | |
| QuadraticResidualCostTpl (xyz::polymorphic< Manifold > space, xyz::polymorphic< StageFunction > function, const ConstMatrixRef &weights) | |
| void | evaluate (const ConstVectorRef &x, const ConstVectorRef &u, CostData &data_) const |
| Evaluate the cost function. | |
| void | computeGradients (const ConstVectorRef &x, const ConstVectorRef &u, CostData &data_) const |
| Compute the cost gradients \((\ell_x, \ell_u)\). | |
| void | computeHessians (const ConstVectorRef &x, const ConstVectorRef &u, CostData &data_) const |
| Compute the cost Hessians \((\ell_{ij})_{i,j \in \{x,u\}}\). | |
| shared_ptr< CostData > | createData () const |
| template<typename Derived> | |
| Derived * | getResidual () |
| Get a pointer to the underlying type of the residual, by attempting to cast. | |
| template<typename Derived> | |
| const Derived * | getResidual () const |
| Get a pointer to the underlying type of the residual, by attempting to cast. | |
Public Member Functions inherited from aligator::CostAbstractTpl< _Scalar > | |
| ALIGATOR_DYNAMIC_TYPEDEFS (Scalar) | |
| int | nx () const |
| int | ndx () const |
| template<class U> | |
| CostAbstractTpl (U &&space, const int nu) | |
| virtual | ~CostAbstractTpl ()=default |
Public Attributes | |
| MatrixXs | weights_ |
| xyz::polymorphic< StageFunction > | residual_ |
| bool | gauss_newton = true |
Public Attributes inherited from aligator::CostAbstractTpl< _Scalar > | |
| xyz::polymorphic< Manifold > | space |
| State dimension. | |
| int | nu |
| Control dimension. | |
Quadratic composite of an underlying function.
This is defined as
\[ c(x, u) \overset{\triangle}{=} \frac{1}{2} \|r(x, u)\|_W^2. \]
Definition at line 18 of file quad-residual-cost.hpp.
| using aligator::QuadraticResidualCostTpl< _Scalar >::Scalar = _Scalar |
Definition at line 19 of file quad-residual-cost.hpp.
| using aligator::QuadraticResidualCostTpl< _Scalar >::Base = CostAbstractTpl<Scalar> |
Definition at line 21 of file quad-residual-cost.hpp.
| using aligator::QuadraticResidualCostTpl< _Scalar >::CostData = CostDataAbstractTpl<Scalar> |
Definition at line 22 of file quad-residual-cost.hpp.
| using aligator::QuadraticResidualCostTpl< _Scalar >::Data = CompositeCostDataTpl<Scalar> |
Definition at line 23 of file quad-residual-cost.hpp.
| using aligator::QuadraticResidualCostTpl< _Scalar >::StageFunction = StageFunctionTpl<Scalar> |
Definition at line 24 of file quad-residual-cost.hpp.
| using aligator::QuadraticResidualCostTpl< _Scalar >::Manifold = ManifoldAbstractTpl<Scalar> |
Definition at line 25 of file quad-residual-cost.hpp.
| aligator::QuadraticResidualCostTpl< _Scalar >::QuadraticResidualCostTpl | ( | xyz::polymorphic< Manifold > | space, |
| xyz::polymorphic< StageFunction > | function, | ||
| const ConstMatrixRef & | weights ) |
| aligator::QuadraticResidualCostTpl< _Scalar >::ALIGATOR_DYNAMIC_TYPEDEFS | ( | Scalar | ) |
|
virtual |
Evaluate the cost function.
Reimplemented from aligator::CostAbstractTpl< _Scalar >.
|
virtual |
Compute the cost gradients \((\ell_x, \ell_u)\).
Reimplemented from aligator::CostAbstractTpl< _Scalar >.
|
virtual |
Compute the cost Hessians \((\ell_{ij})_{i,j \in \{x,u\}}\).
Reimplemented from aligator::CostAbstractTpl< _Scalar >.
|
inlinevirtual |
Reimplemented from aligator::CostAbstractTpl< _Scalar >.
Definition at line 44 of file quad-residual-cost.hpp.
|
inline |
Get a pointer to the underlying type of the residual, by attempting to cast.
Definition at line 51 of file quad-residual-cost.hpp.
|
inline |
Get a pointer to the underlying type of the residual, by attempting to cast.
Definition at line 56 of file quad-residual-cost.hpp.
| MatrixXs aligator::QuadraticResidualCostTpl< _Scalar >::weights_ |
Definition at line 27 of file quad-residual-cost.hpp.
| xyz::polymorphic<StageFunction> aligator::QuadraticResidualCostTpl< _Scalar >::residual_ |
Definition at line 28 of file quad-residual-cost.hpp.
| bool aligator::QuadraticResidualCostTpl< _Scalar >::gauss_newton = true |
Definition at line 29 of file quad-residual-cost.hpp.