#include <aligator/modelling/autodiff/cost-finite-difference.hpp>
Public Types | |
using | Manifold |
using | CostBase |
using | CostData |
![]() | |
using | Scalar |
using | CostData |
using | Manifold |
using | Scalar |
using | CostData |
using | Manifold |
using | Scalar |
using | CostData |
using | Manifold |
using | Scalar |
using | CostData |
using | Manifold |
![]() | |
using | Scalar |
using | Scalar |
Public Member Functions | |
Data (CostFiniteDifferenceHelper const &obj) | |
ALIGATOR_DYNAMIC_TYPEDEFS (Scalar) | |
CostFiniteDifferenceHelper (xyz::polymorphic< CostBase > cost, const Scalar fd_eps) | |
void | evaluate (const ConstVectorRef &x, const ConstVectorRef &u, CostData &data_) const override |
Evaluate the cost function. | |
void | computeGradients (const ConstVectorRef &x, const ConstVectorRef &u, CostData &data_) const override |
Compute the cost gradients \((\ell_x, \ell_u)\). | |
void | computeHessians (const ConstVectorRef &, const ConstVectorRef &, CostData &) const override |
Compute the cost Hessians \((\ell_{ij})_{i,j \in \{x,u\}}\). | |
auto | createData () const -> shared_ptr< CostData > override |
![]() | |
ALIGATOR_DYNAMIC_TYPEDEFS (Scalar) | |
int | nx () const |
int | ndx () const |
CostAbstractTpl (U &&space, const int nu) | |
virtual | ~CostAbstractTpl ()=default |
ALIGATOR_DYNAMIC_TYPEDEFS (Scalar) | |
int | nx () const |
int | ndx () const |
CostAbstractTpl (U &&space, const int nu) | |
virtual | ~CostAbstractTpl ()=default |
ALIGATOR_DYNAMIC_TYPEDEFS (Scalar) | |
int | nx () const |
int | ndx () const |
CostAbstractTpl (U &&space, const int nu) | |
virtual | ~CostAbstractTpl ()=default |
ALIGATOR_DYNAMIC_TYPEDEFS (Scalar) | |
int | nx () const |
int | ndx () const |
CostAbstractTpl (U &&space, const int nu) | |
virtual | ~CostAbstractTpl ()=default |
![]() | |
ALIGATOR_DYNAMIC_TYPEDEFS (Scalar) | |
CostDataAbstractTpl (const int ndx, const int nu) | |
CostDataAbstractTpl (const CostAbstractTpl< Scalar > &cost) | |
virtual | ~CostDataAbstractTpl ()=default |
ALIGATOR_DYNAMIC_TYPEDEFS (Scalar) | |
CostDataAbstractTpl (const int ndx, const int nu) | |
CostDataAbstractTpl (const CostAbstractTpl< Scalar > &cost) | |
virtual | ~CostDataAbstractTpl ()=default |
Public Attributes | |
shared_ptr< CostData > | c1 |
shared_ptr< CostData > | c2 |
VectorXs | dx |
VectorXs | du |
VectorXs | xp |
VectorXs | up |
xyz::polymorphic< Manifold > | space |
State dimension. | |
xyz::polymorphic< CostBase > | cost_ |
Scalar | fd_eps |
xyz::polymorphic< Manifold > | space |
State dimension. | |
![]() | |
xyz::polymorphic< Manifold > | space |
State dimension. | |
int | nu |
Control dimension. | |
xyz::polymorphic< Manifold > | space |
State dimension. | |
int | nu |
Control dimension. | |
xyz::polymorphic< Manifold > | space |
State dimension. | |
int | nu |
Control dimension. | |
xyz::polymorphic< Manifold > | space |
State dimension. | |
int | nu |
Control dimension. | |
![]() | |
int | ndx_ |
int | nu_ |
Scalar | value_ |
VectorXs | grad_ |
MatrixXs | hess_ |
VectorRef | Lx_ |
Gradient \(\ell_x\). | |
VectorRef | Lu_ |
Gradient \(\ell_u\). | |
MatrixRef | Lxx_ |
Hessian \(\ell_{xx}\). | |
MatrixRef | Lxu_ |
Hessian \(\ell_{xu}\). | |
MatrixRef | Lux_ |
Hessian \(\ell_{ux}\). | |
MatrixRef | Luu_ |
Hessian \(\ell_{uu}\). | |
int | ndx_ |
int | nu_ |
Scalar | value_ |
VectorXs | grad_ |
MatrixXs | hess_ |
VectorRef | Lx_ |
Gradient \(\ell_x\). | |
VectorRef | Lu_ |
Gradient \(\ell_u\). | |
MatrixRef | Lxx_ |
Hessian \(\ell_{xx}\). | |
MatrixRef | Lxu_ |
Hessian \(\ell_{xu}\). | |
MatrixRef | Lux_ |
Hessian \(\ell_{ux}\). | |
MatrixRef | Luu_ |
Hessian \(\ell_{uu}\). | |
Definition at line 40 of file cost-finite-difference.hpp.
using aligator::autodiff::CostFiniteDifferenceHelper< Scalar >::Manifold |
Definition at line 10 of file cost-finite-difference.hpp.
using aligator::autodiff::CostFiniteDifferenceHelper< Scalar >::CostBase |
Definition at line 11 of file cost-finite-difference.hpp.
using aligator::autodiff::CostFiniteDifferenceHelper< Scalar >::CostData |
Definition at line 12 of file cost-finite-difference.hpp.
|
inline |
Definition at line 46 of file cost-finite-difference.hpp.
aligator::autodiff::CostFiniteDifferenceHelper< Scalar >::ALIGATOR_DYNAMIC_TYPEDEFS | ( | Scalar | ) |
aligator::autodiff::CostFiniteDifferenceHelper< Scalar >::CostFiniteDifferenceHelper | ( | xyz::polymorphic< CostBase > | cost, |
const Scalar | fd_eps ) |
|
overridevirtual |
Evaluate the cost function.
Reimplemented from aligator::CostAbstractTpl< Scalar >.
|
overridevirtual |
Compute the cost gradients \((\ell_x, \ell_u)\).
Reimplemented from aligator::CostAbstractTpl< Scalar >.
|
inlineoverridevirtual |
Compute the cost Hessians \((\ell_{ij})_{i,j \in \{x,u\}}\).
Reimplemented from aligator::CostAbstractTpl< Scalar >.
Definition at line 30 of file cost-finite-difference.hpp.
|
overridevirtual |
Reimplemented from aligator::CostAbstractTpl< Scalar >.
shared_ptr<CostData> aligator::autodiff::CostFiniteDifferenceHelper< Scalar >::Data::c1 |
Definition at line 42 of file cost-finite-difference.hpp.
shared_ptr<CostData> aligator::autodiff::CostFiniteDifferenceHelper< Scalar >::Data::c2 |
Definition at line 42 of file cost-finite-difference.hpp.
VectorXs aligator::autodiff::CostFiniteDifferenceHelper< Scalar >::Data::dx |
Definition at line 43 of file cost-finite-difference.hpp.
VectorXs aligator::autodiff::CostFiniteDifferenceHelper< Scalar >::Data::du |
Definition at line 43 of file cost-finite-difference.hpp.
VectorXs aligator::autodiff::CostFiniteDifferenceHelper< Scalar >::Data::xp |
Definition at line 44 of file cost-finite-difference.hpp.
VectorXs aligator::autodiff::CostFiniteDifferenceHelper< Scalar >::Data::up |
Definition at line 44 of file cost-finite-difference.hpp.
State dimension.
xyz::polymorphic<CostBase> aligator::autodiff::CostFiniteDifferenceHelper< Scalar >::cost_ |
Definition at line 35 of file cost-finite-difference.hpp.
Definition at line 36 of file cost-finite-difference.hpp.
xyz::polymorphic<Manifold> aligator::CostAbstractTpl< Scalar >::space |
State dimension.
Definition at line 14 of file cost-abstract.hpp.