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

Euclidean quadratic cost. More...

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

Inheritance diagram for aligator::QuadraticCostTpl< _Scalar >:
[legend]
Collaboration diagram for aligator::QuadraticCostTpl< _Scalar >:
[legend]

Public Types

using Scalar = _Scalar
 
using Base = CostAbstractTpl<Scalar>
 
using CostData = CostDataAbstractTpl<Scalar>
 
using Data = QuadraticCostDataTpl<Scalar>
 
using VectorSpace = proxsuite::nlp::VectorSpaceTpl<Scalar, Eigen::Dynamic>
 
using Manifold = proxsuite::nlp::ManifoldAbstractTpl<Scalar>
 
- Public Types inherited from aligator::CostAbstractTpl< _Scalar >
using Scalar
 
using CostData
 
using Manifold
 

Public Member Functions

 ALIGATOR_DYNAMIC_TYPEDEFS (Scalar)
 
 QuadraticCostTpl (const ConstMatrixRef &w_x, const ConstMatrixRef &w_u, const ConstVectorRef &interp_x, const ConstVectorRef &interp_u)
 
 QuadraticCostTpl (const ConstMatrixRef &w_x, const ConstMatrixRef &w_u, const ConstMatrixRef &w_cross, const ConstVectorRef &interp_x, const ConstVectorRef &interp_u)
 
 QuadraticCostTpl (const ConstMatrixRef &w_x, const ConstMatrixRef &w_u)
 
 QuadraticCostTpl (const ConstMatrixRef &w_x, const ConstMatrixRef &w_u, const ConstMatrixRef &w_cross)
 
void evaluate (const ConstVectorRef &x, const ConstVectorRef &u, CostData &data) const
 
void computeGradients (const ConstVectorRef &, const ConstVectorRef &, CostData &data) const
 
void computeHessians (const ConstVectorRef &, const ConstVectorRef &, CostData &) const
 
shared_ptr< CostDatacreateData () const
 
ConstMatrixRef getCrossWeights () const
 
void setCrossWeight (const ConstMatrixRef &w)
 
bool hasCrossTerm () const
 Whether a cross term exists.
 
- 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
 

Static Public Member Functions

static auto get_vector_space (Eigen::Index nx)
 

Public Attributes

MatrixXs Wxx_
 Weight \( Q \).
 
MatrixXs Wuu_
 Weight \( R \).
 
VectorXs interp_x
 Affine term in \( x\).
 
VectorXs interp_u
 Affine term in \( u\).
 
- Public Attributes inherited from aligator::CostAbstractTpl< _Scalar >
xyz::polymorphic< Manifoldspace
 State dimension.
 
int nu
 Control dimension.
 

Protected Attributes

MatrixXs Wxu_
 Weight N for term \( x^\top N u \).
 
bool has_cross_term_
 Whether a cross term exists.
 

Detailed Description

template<typename _Scalar>
struct aligator::QuadraticCostTpl< _Scalar >

Euclidean quadratic cost.

Definition at line 13 of file quad-costs.hpp.

Member Typedef Documentation

◆ Scalar

template<typename _Scalar >
using aligator::QuadraticCostTpl< _Scalar >::Scalar = _Scalar

Definition at line 15 of file quad-costs.hpp.

◆ Base

template<typename _Scalar >
using aligator::QuadraticCostTpl< _Scalar >::Base = CostAbstractTpl<Scalar>

Definition at line 17 of file quad-costs.hpp.

◆ CostData

template<typename _Scalar >
using aligator::QuadraticCostTpl< _Scalar >::CostData = CostDataAbstractTpl<Scalar>

Definition at line 18 of file quad-costs.hpp.

◆ Data

template<typename _Scalar >
using aligator::QuadraticCostTpl< _Scalar >::Data = QuadraticCostDataTpl<Scalar>

Definition at line 20 of file quad-costs.hpp.

◆ VectorSpace

template<typename _Scalar >
using aligator::QuadraticCostTpl< _Scalar >::VectorSpace = proxsuite::nlp::VectorSpaceTpl<Scalar, Eigen::Dynamic>

Definition at line 21 of file quad-costs.hpp.

◆ Manifold

template<typename _Scalar >
using aligator::QuadraticCostTpl< _Scalar >::Manifold = proxsuite::nlp::ManifoldAbstractTpl<Scalar>

Definition at line 22 of file quad-costs.hpp.

Constructor & Destructor Documentation

◆ QuadraticCostTpl() [1/4]

template<typename _Scalar >
aligator::QuadraticCostTpl< _Scalar >::QuadraticCostTpl ( const ConstMatrixRef & w_x,
const ConstMatrixRef & w_u,
const ConstVectorRef & interp_x,
const ConstVectorRef & interp_u )
inline

Definition at line 43 of file quad-costs.hpp.

◆ QuadraticCostTpl() [2/4]

template<typename _Scalar >
aligator::QuadraticCostTpl< _Scalar >::QuadraticCostTpl ( const ConstMatrixRef & w_x,
const ConstMatrixRef & w_u,
const ConstMatrixRef & w_cross,
const ConstVectorRef & interp_x,
const ConstVectorRef & interp_u )
inline

Definition at line 53 of file quad-costs.hpp.

◆ QuadraticCostTpl() [3/4]

template<typename _Scalar >
aligator::QuadraticCostTpl< _Scalar >::QuadraticCostTpl ( const ConstMatrixRef & w_x,
const ConstMatrixRef & w_u )
inline

Definition at line 63 of file quad-costs.hpp.

◆ QuadraticCostTpl() [4/4]

template<typename _Scalar >
aligator::QuadraticCostTpl< _Scalar >::QuadraticCostTpl ( const ConstMatrixRef & w_x,
const ConstMatrixRef & w_u,
const ConstMatrixRef & w_cross )
inline

Definition at line 67 of file quad-costs.hpp.

Member Function Documentation

◆ ALIGATOR_DYNAMIC_TYPEDEFS()

template<typename _Scalar >
aligator::QuadraticCostTpl< _Scalar >::ALIGATOR_DYNAMIC_TYPEDEFS ( Scalar )

◆ get_vector_space()

template<typename _Scalar >
static auto aligator::QuadraticCostTpl< _Scalar >::get_vector_space ( Eigen::Index nx)
inlinestatic

Definition at line 39 of file quad-costs.hpp.

◆ evaluate()

template<typename _Scalar >
void aligator::QuadraticCostTpl< _Scalar >::evaluate ( const ConstVectorRef & x,
const ConstVectorRef & u,
CostData & data ) const
inline

Definition at line 72 of file quad-costs.hpp.

◆ computeGradients()

template<typename _Scalar >
void aligator::QuadraticCostTpl< _Scalar >::computeGradients ( const ConstVectorRef & ,
const ConstVectorRef & ,
CostData & data ) const
inline

Definition at line 88 of file quad-costs.hpp.

◆ computeHessians()

template<typename _Scalar >
void aligator::QuadraticCostTpl< _Scalar >::computeHessians ( const ConstVectorRef & ,
const ConstVectorRef & ,
CostData &  ) const
inline

Definition at line 95 of file quad-costs.hpp.

◆ createData()

template<typename _Scalar >
shared_ptr< CostData > aligator::QuadraticCostTpl< _Scalar >::createData ( ) const
inlinevirtual

Reimplemented from aligator::CostAbstractTpl< _Scalar >.

Definition at line 98 of file quad-costs.hpp.

◆ getCrossWeights()

template<typename _Scalar >
ConstMatrixRef aligator::QuadraticCostTpl< _Scalar >::getCrossWeights ( ) const
inline

Definition at line 107 of file quad-costs.hpp.

◆ setCrossWeight()

template<typename _Scalar >
void aligator::QuadraticCostTpl< _Scalar >::setCrossWeight ( const ConstMatrixRef & w)
inline

Definition at line 108 of file quad-costs.hpp.

◆ hasCrossTerm()

template<typename _Scalar >
bool aligator::QuadraticCostTpl< _Scalar >::hasCrossTerm ( ) const
inline

Whether a cross term exists.

Definition at line 115 of file quad-costs.hpp.

Member Data Documentation

◆ Wxx_

template<typename _Scalar >
MatrixXs aligator::QuadraticCostTpl< _Scalar >::Wxx_

Weight \( Q \).

Definition at line 25 of file quad-costs.hpp.

◆ Wuu_

template<typename _Scalar >
MatrixXs aligator::QuadraticCostTpl< _Scalar >::Wuu_

Weight \( R \).

Definition at line 27 of file quad-costs.hpp.

◆ Wxu_

template<typename _Scalar >
MatrixXs aligator::QuadraticCostTpl< _Scalar >::Wxu_
protected

Weight N for term \( x^\top N u \).

Definition at line 31 of file quad-costs.hpp.

◆ interp_x

template<typename _Scalar >
VectorXs aligator::QuadraticCostTpl< _Scalar >::interp_x

Affine term in \( x\).

Definition at line 35 of file quad-costs.hpp.

◆ interp_u

template<typename _Scalar >
VectorXs aligator::QuadraticCostTpl< _Scalar >::interp_u

Affine term in \( u\).

Definition at line 37 of file quad-costs.hpp.

◆ has_cross_term_

template<typename _Scalar >
bool aligator::QuadraticCostTpl< _Scalar >::has_cross_term_
protected

Whether a cross term exists.

Definition at line 119 of file quad-costs.hpp.


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