aligator  0.12.0
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
 
Loading...
Searching...
No Matches
aligator::autodiff::CostFiniteDifferenceHelper< Scalar >::Data Struct Reference

#include <aligator/modelling/autodiff/cost-finite-difference.hpp>

Inheritance diagram for aligator::autodiff::CostFiniteDifferenceHelper< Scalar >::Data:
[legend]
Collaboration diagram for aligator::autodiff::CostFiniteDifferenceHelper< Scalar >::Data:
[legend]

Public Types

using Manifold
 
using CostBase
 
using CostData
 
- Public Types inherited from aligator::CostAbstractTpl< Scalar >
using Scalar
 
using CostData
 
using Manifold
 
using Scalar
 
using CostData
 
using Manifold
 
using Scalar
 
using CostData
 
using Manifold
 
using Scalar
 
using CostData
 
using Manifold
 
- Public Types inherited from aligator::CostDataAbstractTpl< Scalar >
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
 
- 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 ~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
 
- Public Member Functions inherited from aligator::CostDataAbstractTpl< Scalar >
 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< CostDatac1
 
shared_ptr< CostDatac2
 
VectorXs dx
 
VectorXs du
 
VectorXs xp
 
VectorXs up
 
xyz::polymorphic< Manifoldspace
 State dimension.
 
xyz::polymorphic< CostBasecost_
 
Scalar fd_eps
 
xyz::polymorphic< Manifoldspace
 State dimension.
 
- Public Attributes inherited from aligator::CostAbstractTpl< Scalar >
xyz::polymorphic< Manifoldspace
 State dimension.
 
int nu
 Control dimension.
 
xyz::polymorphic< Manifoldspace
 State dimension.
 
int nu
 Control dimension.
 
xyz::polymorphic< Manifoldspace
 State dimension.
 
int nu
 Control dimension.
 
xyz::polymorphic< Manifoldspace
 State dimension.
 
int nu
 Control dimension.
 
- Public Attributes inherited from aligator::CostDataAbstractTpl< Scalar >
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}\).
 

Detailed Description

template<typename Scalar>
struct aligator::autodiff::CostFiniteDifferenceHelper< Scalar >::Data

Definition at line 40 of file cost-finite-difference.hpp.

Member Typedef Documentation

◆ Manifold

◆ CostBase

◆ CostData

Constructor & Destructor Documentation

◆ Data()

template<typename Scalar>
aligator::autodiff::CostFiniteDifferenceHelper< Scalar >::Data::Data ( CostFiniteDifferenceHelper const & obj)
inline

Definition at line 46 of file cost-finite-difference.hpp.

Member Function Documentation

◆ ALIGATOR_DYNAMIC_TYPEDEFS()

◆ CostFiniteDifferenceHelper()

aligator::autodiff::CostFiniteDifferenceHelper< Scalar >::CostFiniteDifferenceHelper ( xyz::polymorphic< CostBase > cost,
const Scalar fd_eps )

◆ evaluate()

void aligator::autodiff::CostFiniteDifferenceHelper< Scalar >::evaluate ( const ConstVectorRef & x,
const ConstVectorRef & u,
CostData & data_ ) const
overridevirtual

Evaluate the cost function.

Reimplemented from aligator::CostAbstractTpl< Scalar >.

◆ computeGradients()

void aligator::autodiff::CostFiniteDifferenceHelper< Scalar >::computeGradients ( const ConstVectorRef & x,
const ConstVectorRef & u,
CostData & data_ ) const
overridevirtual

Compute the cost gradients \((\ell_x, \ell_u)\).

Reimplemented from aligator::CostAbstractTpl< Scalar >.

◆ computeHessians()

void aligator::autodiff::CostFiniteDifferenceHelper< Scalar >::computeHessians ( const ConstVectorRef & ,
const ConstVectorRef & ,
CostData &  ) const
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.

◆ createData()

auto aligator::autodiff::CostFiniteDifferenceHelper< Scalar >::createData ( ) const -> shared_ptr<CostData>
overridevirtual

Member Data Documentation

◆ c1

template<typename Scalar>
shared_ptr<CostData> aligator::autodiff::CostFiniteDifferenceHelper< Scalar >::Data::c1

Definition at line 42 of file cost-finite-difference.hpp.

◆ c2

template<typename Scalar>
shared_ptr<CostData> aligator::autodiff::CostFiniteDifferenceHelper< Scalar >::Data::c2

Definition at line 42 of file cost-finite-difference.hpp.

◆ dx

template<typename Scalar>
VectorXs aligator::autodiff::CostFiniteDifferenceHelper< Scalar >::Data::dx

Definition at line 43 of file cost-finite-difference.hpp.

◆ du

template<typename Scalar>
VectorXs aligator::autodiff::CostFiniteDifferenceHelper< Scalar >::Data::du

Definition at line 43 of file cost-finite-difference.hpp.

◆ xp

template<typename Scalar>
VectorXs aligator::autodiff::CostFiniteDifferenceHelper< Scalar >::Data::xp

Definition at line 44 of file cost-finite-difference.hpp.

◆ up

template<typename Scalar>
VectorXs aligator::autodiff::CostFiniteDifferenceHelper< Scalar >::Data::up

Definition at line 44 of file cost-finite-difference.hpp.

◆ space [1/2]

State dimension.

◆ cost_

Definition at line 35 of file cost-finite-difference.hpp.

◆ fd_eps

◆ space [2/2]

xyz::polymorphic<Manifold> aligator::CostAbstractTpl< Scalar >::space

State dimension.

Definition at line 14 of file cost-abstract.hpp.


The documentation for this struct was generated from the following file: