aligator  0.9.0
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
Loading...
Searching...
No Matches
aligator::LogResidualCostTpl< Scalar > Struct Template Reference

Log-barrier of an underlying cost function. More...

#include <aligator/modelling/costs/log-residual-cost.hpp>

Inheritance diagram for aligator::LogResidualCostTpl< Scalar >:
[legend]
Collaboration diagram for aligator::LogResidualCostTpl< Scalar >:
[legend]

Public Types

using CostDataAbstract = CostDataAbstractTpl<Scalar>
 
using Data = CompositeCostDataTpl<Scalar>
 
using StageFunction = StageFunctionTpl<Scalar>
 
using Base = CostAbstractTpl<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)
 
 LogResidualCostTpl (xyz::polymorphic< Manifold > space, xyz::polymorphic< StageFunction > function, const ConstVectorRef &scale)
 
 LogResidualCostTpl (xyz::polymorphic< Manifold > space, xyz::polymorphic< StageFunction > function, const Scalar scale)
 
void evaluate (const ConstVectorRef &x, const ConstVectorRef &u, CostDataAbstract &data) const
 Evaluate the cost function.
 
void computeGradients (const ConstVectorRef &x, const ConstVectorRef &u, CostDataAbstract &data) const
 Compute the cost gradients \((\ell_x, \ell_u)\).
 
void computeHessians (const ConstVectorRef &, const ConstVectorRef &, CostDataAbstract &data) const
 Compute the cost Hessians \((\ell_{ij})_{i,j \in \{x,u\}}\).
 
shared_ptr< CostDataAbstractcreateData () 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

VectorXs barrier_weights_
 
xyz::polymorphic< StageFunctionresidual_
 
- Public Attributes inherited from aligator::CostAbstractTpl< Scalar >
xyz::polymorphic< Manifoldspace
 State dimension.
 
int nu
 Control dimension.
 

Detailed Description

template<typename Scalar>
struct aligator::LogResidualCostTpl< Scalar >

Log-barrier of an underlying cost function.

Definition at line 10 of file log-residual-cost.hpp.

Member Typedef Documentation

◆ CostDataAbstract

template<typename Scalar >
using aligator::LogResidualCostTpl< Scalar >::CostDataAbstract = CostDataAbstractTpl<Scalar>

Definition at line 12 of file log-residual-cost.hpp.

◆ Data

template<typename Scalar >
using aligator::LogResidualCostTpl< Scalar >::Data = CompositeCostDataTpl<Scalar>

Definition at line 13 of file log-residual-cost.hpp.

◆ StageFunction

template<typename Scalar >
using aligator::LogResidualCostTpl< Scalar >::StageFunction = StageFunctionTpl<Scalar>

Definition at line 14 of file log-residual-cost.hpp.

◆ Base

template<typename Scalar >
using aligator::LogResidualCostTpl< Scalar >::Base = CostAbstractTpl<Scalar>

Definition at line 15 of file log-residual-cost.hpp.

◆ Manifold

template<typename Scalar >
using aligator::LogResidualCostTpl< Scalar >::Manifold = ManifoldAbstractTpl<Scalar>

Definition at line 16 of file log-residual-cost.hpp.

Constructor & Destructor Documentation

◆ LogResidualCostTpl() [1/2]

template<typename Scalar >
aligator::LogResidualCostTpl< Scalar >::LogResidualCostTpl ( xyz::polymorphic< Manifold > space,
xyz::polymorphic< StageFunction > function,
const ConstVectorRef & scale )

◆ LogResidualCostTpl() [2/2]

template<typename Scalar >
aligator::LogResidualCostTpl< Scalar >::LogResidualCostTpl ( xyz::polymorphic< Manifold > space,
xyz::polymorphic< StageFunction > function,
const Scalar scale )

Member Function Documentation

◆ ALIGATOR_DYNAMIC_TYPEDEFS()

template<typename Scalar >
aligator::LogResidualCostTpl< Scalar >::ALIGATOR_DYNAMIC_TYPEDEFS ( Scalar )

◆ evaluate()

template<typename Scalar >
void aligator::LogResidualCostTpl< Scalar >::evaluate ( const ConstVectorRef & x,
const ConstVectorRef & u,
CostDataAbstract & data ) const
virtual

Evaluate the cost function.

Reimplemented from aligator::CostAbstractTpl< Scalar >.

◆ computeGradients()

template<typename Scalar >
void aligator::LogResidualCostTpl< Scalar >::computeGradients ( const ConstVectorRef & x,
const ConstVectorRef & u,
CostDataAbstract & data ) const
virtual

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

Reimplemented from aligator::CostAbstractTpl< Scalar >.

◆ computeHessians()

template<typename Scalar >
void aligator::LogResidualCostTpl< Scalar >::computeHessians ( const ConstVectorRef & x,
const ConstVectorRef & u,
CostDataAbstract & data ) const
virtual

Compute the cost Hessians \((\ell_{ij})_{i,j \in \{x,u\}}\).

Reimplemented from aligator::CostAbstractTpl< Scalar >.

◆ createData()

template<typename Scalar >
shared_ptr< CostDataAbstract > aligator::LogResidualCostTpl< Scalar >::createData ( ) const
inlinevirtual

Reimplemented from aligator::CostAbstractTpl< Scalar >.

Definition at line 38 of file log-residual-cost.hpp.

◆ getResidual() [1/2]

template<typename Scalar >
template<typename Derived >
Derived * aligator::LogResidualCostTpl< Scalar >::getResidual ( )
inline

Get a pointer to the underlying type of the residual, by attempting to cast.

Definition at line 45 of file log-residual-cost.hpp.

◆ getResidual() [2/2]

template<typename Scalar >
template<typename Derived >
const Derived * aligator::LogResidualCostTpl< Scalar >::getResidual ( ) const
inline

Get a pointer to the underlying type of the residual, by attempting to cast.

Definition at line 50 of file log-residual-cost.hpp.

Member Data Documentation

◆ barrier_weights_

template<typename Scalar >
VectorXs aligator::LogResidualCostTpl< Scalar >::barrier_weights_

Definition at line 18 of file log-residual-cost.hpp.

◆ residual_

template<typename Scalar >
xyz::polymorphic<StageFunction> aligator::LogResidualCostTpl< Scalar >::residual_

Definition at line 19 of file log-residual-cost.hpp.


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