aligator
0.10.0
A primal-dual augmented Lagrangian-type solver for nonlinear 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 |
using | CostData |
using | Manifold |
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 |
void | computeGradients (const ConstVectorRef &x, const ConstVectorRef &u, CostData &data_) const |
void | computeHessians (const ConstVectorRef &x, const ConstVectorRef &u, CostData &data_) const |
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 |
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 | ~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 | ) |
void aligator::QuadraticResidualCostTpl< _Scalar >::evaluate | ( | const ConstVectorRef & | x, |
const ConstVectorRef & | u, | ||
CostData & | data_ ) const |
void aligator::QuadraticResidualCostTpl< _Scalar >::computeGradients | ( | const ConstVectorRef & | x, |
const ConstVectorRef & | u, | ||
CostData & | data_ ) const |
void aligator::QuadraticResidualCostTpl< _Scalar >::computeHessians | ( | const ConstVectorRef & | x, |
const ConstVectorRef & | u, | ||
CostData & | data_ ) const |
|
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.