aligator  0.16.0
A versatile and efficient C++ library for real-time constrained trajectory optimization.
Loading...
Searching...
No Matches
aligator::QuadraticStateCostTpl< Scalar > Struct Template Reference

Quadratic distance cost over the state manifold. More...

#include <aligator/modelling/costs/quad-state-cost.hpp>

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

Public Types

using Base = QuadraticResidualCostTpl<Scalar>
using StateError = StateErrorResidualTpl<Scalar>
using Manifold = ManifoldAbstractTpl<Scalar>
using StageFunction = StageFunctionTpl<Scalar>
Public Types inherited from aligator::QuadraticResidualCostTpl< Scalar >
using Scalar
using Base
using CostData
using Data
using StageFunction
using Manifold
Public Types inherited from aligator::CostAbstractTpl< Scalar >
using Scalar
using CostData
using Manifold
using Scalar
using CostData
using Manifold

Public Member Functions

 ALIGATOR_DYNAMIC_TYPEDEFS (Scalar)
 QuadraticStateCostTpl (const StateError &resdl, const MatrixXs &weights)
 QuadraticStateCostTpl (xyz::polymorphic< Manifold > space, const int nu, const ConstVectorRef &target, const MatrixXs &weights)
template<typename U, typename = std::enable_if_t<!is_polymorphic_of_v<Manifold, U>>>
 QuadraticStateCostTpl (U &&space, const int nu, const ConstVectorRef &target, const MatrixXs &weights)
void setTarget (const ConstVectorRef target)
ConstVectorRef getTarget () const
Public Member Functions inherited from aligator::QuadraticResidualCostTpl< Scalar >
 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< CostDatacreateData () const
Derived * getResidual ()
 Get a pointer to the underlying type of the residual, by attempting to cast.
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 ~CostAbstractTpl ()=default
 ALIGATOR_DYNAMIC_TYPEDEFS (Scalar)
int nx () const
int ndx () const
 CostAbstractTpl (U &&space, const int nu)
virtual ~CostAbstractTpl ()=default

Protected Member Functions

StateErrorresidual ()
const StateErrorresidual () const

Additional Inherited Members

Public Attributes inherited from aligator::QuadraticResidualCostTpl< Scalar >
MatrixXs weights_
xyz::polymorphic< StageFunctionresidual_
bool gauss_newton
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.

Detailed Description

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

Quadratic distance cost over the state manifold.

Definition at line 13 of file quad-state-cost.hpp.

Member Typedef Documentation

◆ Base

Definition at line 15 of file quad-state-cost.hpp.

◆ StateError

Definition at line 16 of file quad-state-cost.hpp.

◆ Manifold

Definition at line 17 of file quad-state-cost.hpp.

◆ StageFunction

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

Definition at line 18 of file quad-state-cost.hpp.

Constructor & Destructor Documentation

◆ QuadraticStateCostTpl() [1/3]

template<typename Scalar>
aligator::QuadraticStateCostTpl< Scalar >::QuadraticStateCostTpl(const StateError &resdl,
const MatrixXs &weights )
inline

Definition at line 21 of file quad-state-cost.hpp.

◆ QuadraticStateCostTpl() [2/3]

template<typename Scalar>
aligator::QuadraticStateCostTpl< Scalar >::QuadraticStateCostTpl(xyz::polymorphic< Manifold >space,
const intnu,
const ConstVectorRef &target,
const MatrixXs &weights )
inline

Definition at line 24 of file quad-state-cost.hpp.

◆ QuadraticStateCostTpl() [3/3]

template<typename Scalar>
template<typename U, typename = std::enable_if_t<!is_polymorphic_of_v<Manifold, U>>>
aligator::QuadraticStateCostTpl< Scalar >::QuadraticStateCostTpl(U &&space,
const intnu,
const ConstVectorRef &target,
const MatrixXs &weights )
inline

Definition at line 31 of file quad-state-cost.hpp.

Member Function Documentation

◆ ALIGATOR_DYNAMIC_TYPEDEFS()

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

◆ setTarget()

template<typename Scalar>
void aligator::QuadraticStateCostTpl< Scalar >::setTarget(const ConstVectorReftarget)
inline

Definition at line 36 of file quad-state-cost.hpp.

◆ getTarget()

template<typename Scalar>
ConstVectorRef aligator::QuadraticStateCostTpl< Scalar >::getTarget()const
inline

Definition at line 37 of file quad-state-cost.hpp.

◆ residual() [1/2]

template<typename Scalar>
StateError & aligator::QuadraticStateCostTpl< Scalar >::residual()
inlineprotected

Definition at line 40 of file quad-state-cost.hpp.

◆ residual() [2/2]

template<typename Scalar>
const StateError & aligator::QuadraticStateCostTpl< Scalar >::residual()const
inlineprotected

Definition at line 41 of file quad-state-cost.hpp.


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