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

Struct describing a stage of a constrained LQ problem. More...

#include <aligator/gar/lqr-problem.hpp>

Collaboration diagram for aligator::gar::LqrKnotTpl< Scalar >:
[legend]

Classes

struct  __view_base
 

Public Types

using MVec = ManagedMatrix<Scalar, Eigen::Dynamic, 1>
 
using MMat = ManagedMatrix<Scalar, Eigen::Dynamic, Eigen::Dynamic>
 
using allocator_type = polymorphic_allocator
 
template<typename T, bool Cond>
using add_const_if_t = std::conditional_t<Cond, std::add_const_t<T>, T>
 
using view_t = __view_base<false>
 
using const_view_t = __view_base<true>
 

Public Member Functions

 ALIGATOR_DYNAMIC_TYPEDEFS (Scalar)
 
view_t to_view ()
 Convert knot to an aggregate of Eigen::Map.
 
const_view_t to_const_view () const
 Convert knot to an aggregate of Eigen::Map to const.
 
const_view_t to_view () const
 
 operator view_t ()
 
 operator const_view_t () const
 
 LqrKnotTpl (uint nx, uint nu, uint nc, uint nx2, uint nth, allocator_type alloc={})
 
 LqrKnotTpl (uint nx, uint nu, uint nc, uint nx2, allocator_type alloc={})
 Delegating constructor, assumes nth = 0.
 
 LqrKnotTpl (uint nx, uint nu, uint nc, allocator_type alloc={})
 Delegating constructor, assumes nx2 = nx, and nth = 0.
 
 LqrKnotTpl (const LqrKnotTpl &other, allocator_type alloc={})
 Copy constructor. Allocator must be given.
 
 LqrKnotTpl (LqrKnotTpl &&other)
 Move constructor. Allocator will be moved from other. Other will be have m_empty_after_move set to true.
 
LqrKnotTploperator= (const LqrKnotTpl &other)
 Copy assignment. Current allocator will be reused if required.
 
LqrKnotTploperator= (LqrKnotTpl &&)
 Move assignment. Other allocator will be stolen.
 
 ~LqrKnotTpl ()
 
void assign (const LqrKnotTpl< Scalar > &other)
 Assign matrices (and dimensions) from another LqrKnotTpl.
 
LqrKnotTpladdParameterization (uint nth)
 
bool isApprox (const LqrKnotTpl &other, Scalar prec=std::numeric_limits< Scalar >::epsilon()) const
 
allocator_type get_allocator () const
 

Public Attributes

uint nx
 
uint nu
 
uint nc
 
uint nx2
 
uint nth
 
MMat Q
 
MMat S
 
MMat R
 
MVec q
 
MVec r
 
MMat A
 
MMat B
 
MMat E
 
MVec f
 
MMat C
 
MMat D
 
MVec d
 
MMat Gth
 
MMat Gx
 
MMat Gu
 
MMat Gv
 
MVec gamma
 

Static Public Attributes

static constexpr int Alignment = Eigen::AlignedMax
 

Friends

bool operator== (const LqrKnotTpl &lhs, const LqrKnotTpl &rhs)
 

Detailed Description

template<typename Scalar>
struct aligator::gar::LqrKnotTpl< Scalar >

Struct describing a stage of a constrained LQ problem.

A LQ knot corresponding to cost

\[ \frac{1}{2} \begin{bmatrix}x \\ u\end{bmatrix}^\top \begin{bmatrix}Q & S \\ S^\top & R\end{bmatrix} \begin{bmatrix}x \\ u\end{bmatrix} + q^\top x + r^\top u \]

and constraints

\[ Ex' + Ax + Bu + f = 0, \quad Cx + Du + d = 0. \]

Definition at line 32 of file lqr-problem.hpp.

Member Typedef Documentation

◆ MVec

template<typename Scalar>
using aligator::gar::LqrKnotTpl< Scalar >::MVec = ManagedMatrix<Scalar, Eigen::Dynamic, 1>

Definition at line 35 of file lqr-problem.hpp.

◆ MMat

template<typename Scalar>
using aligator::gar::LqrKnotTpl< Scalar >::MMat = ManagedMatrix<Scalar, Eigen::Dynamic, Eigen::Dynamic>

Definition at line 36 of file lqr-problem.hpp.

◆ allocator_type

template<typename Scalar>
using aligator::gar::LqrKnotTpl< Scalar >::allocator_type = polymorphic_allocator

Definition at line 37 of file lqr-problem.hpp.

◆ add_const_if_t

template<typename Scalar>
template<typename T, bool Cond>
using aligator::gar::LqrKnotTpl< Scalar >::add_const_if_t = std::conditional_t<Cond, std::add_const_t<T>, T>

Definition at line 59 of file lqr-problem.hpp.

◆ view_t

template<typename Scalar>
using aligator::gar::LqrKnotTpl< Scalar >::view_t = __view_base<false>

Definition at line 81 of file lqr-problem.hpp.

◆ const_view_t

template<typename Scalar>
using aligator::gar::LqrKnotTpl< Scalar >::const_view_t = __view_base<true>

Definition at line 82 of file lqr-problem.hpp.

Constructor & Destructor Documentation

◆ LqrKnotTpl() [1/5]

template<typename Scalar>
aligator::gar::LqrKnotTpl< Scalar >::LqrKnotTpl ( uint nx,
uint nu,
uint nc,
uint nx2,
uint nth,
allocator_type alloc = {} )

◆ LqrKnotTpl() [2/5]

template<typename Scalar>
aligator::gar::LqrKnotTpl< Scalar >::LqrKnotTpl ( uint nx,
uint nu,
uint nc,
uint nx2,
allocator_type alloc = {} )
inline

Delegating constructor, assumes nth = 0.

Definition at line 159 of file lqr-problem.hpp.

◆ LqrKnotTpl() [3/5]

template<typename Scalar>
aligator::gar::LqrKnotTpl< Scalar >::LqrKnotTpl ( uint nx,
uint nu,
uint nc,
allocator_type alloc = {} )
inline

Delegating constructor, assumes nx2 = nx, and nth = 0.

Definition at line 163 of file lqr-problem.hpp.

◆ LqrKnotTpl() [4/5]

template<typename Scalar>
aligator::gar::LqrKnotTpl< Scalar >::LqrKnotTpl ( const LqrKnotTpl< Scalar > & other,
allocator_type alloc = {} )

Copy constructor. Allocator must be given.

◆ LqrKnotTpl() [5/5]

template<typename Scalar>
aligator::gar::LqrKnotTpl< Scalar >::LqrKnotTpl ( LqrKnotTpl< Scalar > && other)

Move constructor. Allocator will be moved from other. Other will be have m_empty_after_move set to true.

◆ ~LqrKnotTpl()

template<typename Scalar>
aligator::gar::LqrKnotTpl< Scalar >::~LqrKnotTpl ( )

Member Function Documentation

◆ ALIGATOR_DYNAMIC_TYPEDEFS()

template<typename Scalar>
aligator::gar::LqrKnotTpl< Scalar >::ALIGATOR_DYNAMIC_TYPEDEFS ( Scalar )

◆ to_view() [1/2]

template<typename Scalar>
view_t aligator::gar::LqrKnotTpl< Scalar >::to_view ( )
inline

Convert knot to an aggregate of Eigen::Map.

This is a convenience method for running computations.

Definition at line 87 of file lqr-problem.hpp.

◆ to_const_view()

template<typename Scalar>
const_view_t aligator::gar::LqrKnotTpl< Scalar >::to_const_view ( ) const
inline

Convert knot to an aggregate of Eigen::Map to const.

Definition at line 119 of file lqr-problem.hpp.

◆ to_view() [2/2]

template<typename Scalar>
const_view_t aligator::gar::LqrKnotTpl< Scalar >::to_view ( ) const
inline

Definition at line 150 of file lqr-problem.hpp.

◆ operator view_t()

template<typename Scalar>
aligator::gar::LqrKnotTpl< Scalar >::operator view_t ( )
inline

Definition at line 152 of file lqr-problem.hpp.

◆ operator const_view_t()

template<typename Scalar>
aligator::gar::LqrKnotTpl< Scalar >::operator const_view_t ( ) const
inline

Definition at line 153 of file lqr-problem.hpp.

◆ operator=() [1/2]

template<typename Scalar>
LqrKnotTpl & aligator::gar::LqrKnotTpl< Scalar >::operator= ( const LqrKnotTpl< Scalar > & other)

Copy assignment. Current allocator will be reused if required.

◆ operator=() [2/2]

template<typename Scalar>
LqrKnotTpl & aligator::gar::LqrKnotTpl< Scalar >::operator= ( LqrKnotTpl< Scalar > && )

Move assignment. Other allocator will be stolen.

◆ assign()

template<typename Scalar>
void aligator::gar::LqrKnotTpl< Scalar >::assign ( const LqrKnotTpl< Scalar > & other)

Assign matrices (and dimensions) from another LqrKnotTpl.

◆ addParameterization()

template<typename Scalar>
LqrKnotTpl & aligator::gar::LqrKnotTpl< Scalar >::addParameterization ( uint nth)

◆ isApprox()

template<typename Scalar>
bool aligator::gar::LqrKnotTpl< Scalar >::isApprox ( const LqrKnotTpl< Scalar > & other,
Scalar prec = std::numeric_limits< Scalar >::epsilon() ) const

◆ get_allocator()

template<typename Scalar>
allocator_type aligator::gar::LqrKnotTpl< Scalar >::get_allocator ( ) const
inline

Definition at line 191 of file lqr-problem.hpp.

Friends And Related Symbol Documentation

◆ operator==

template<typename Scalar>
bool operator== ( const LqrKnotTpl< Scalar > & lhs,
const LqrKnotTpl< Scalar > & rhs )
friend

Definition at line 187 of file lqr-problem.hpp.

Member Data Documentation

◆ Alignment

template<typename Scalar>
int aligator::gar::LqrKnotTpl< Scalar >::Alignment = Eigen::AlignedMax
staticconstexpr

Definition at line 34 of file lqr-problem.hpp.

◆ nx

template<typename Scalar>
uint aligator::gar::LqrKnotTpl< Scalar >::nx

Definition at line 39 of file lqr-problem.hpp.

◆ nu

template<typename Scalar>
uint aligator::gar::LqrKnotTpl< Scalar >::nu

Definition at line 40 of file lqr-problem.hpp.

◆ nc

template<typename Scalar>
uint aligator::gar::LqrKnotTpl< Scalar >::nc

Definition at line 41 of file lqr-problem.hpp.

◆ nx2

template<typename Scalar>
uint aligator::gar::LqrKnotTpl< Scalar >::nx2

Definition at line 42 of file lqr-problem.hpp.

◆ nth

template<typename Scalar>
uint aligator::gar::LqrKnotTpl< Scalar >::nth

Definition at line 43 of file lqr-problem.hpp.

◆ Q

template<typename Scalar>
MMat aligator::gar::LqrKnotTpl< Scalar >::Q

Definition at line 45 of file lqr-problem.hpp.

◆ S

template<typename Scalar>
MMat aligator::gar::LqrKnotTpl< Scalar >::S

Definition at line 45 of file lqr-problem.hpp.

◆ R

template<typename Scalar>
MMat aligator::gar::LqrKnotTpl< Scalar >::R

Definition at line 45 of file lqr-problem.hpp.

◆ q

template<typename Scalar>
MVec aligator::gar::LqrKnotTpl< Scalar >::q

Definition at line 46 of file lqr-problem.hpp.

◆ r

template<typename Scalar>
MVec aligator::gar::LqrKnotTpl< Scalar >::r

Definition at line 46 of file lqr-problem.hpp.

◆ A

template<typename Scalar>
MMat aligator::gar::LqrKnotTpl< Scalar >::A

Definition at line 47 of file lqr-problem.hpp.

◆ B

template<typename Scalar>
MMat aligator::gar::LqrKnotTpl< Scalar >::B

Definition at line 47 of file lqr-problem.hpp.

◆ E

template<typename Scalar>
MMat aligator::gar::LqrKnotTpl< Scalar >::E

Definition at line 47 of file lqr-problem.hpp.

◆ f

template<typename Scalar>
MVec aligator::gar::LqrKnotTpl< Scalar >::f

Definition at line 48 of file lqr-problem.hpp.

◆ C

template<typename Scalar>
MMat aligator::gar::LqrKnotTpl< Scalar >::C

Definition at line 49 of file lqr-problem.hpp.

◆ D

template<typename Scalar>
MMat aligator::gar::LqrKnotTpl< Scalar >::D

Definition at line 49 of file lqr-problem.hpp.

◆ d

template<typename Scalar>
MVec aligator::gar::LqrKnotTpl< Scalar >::d

Definition at line 50 of file lqr-problem.hpp.

◆ Gth

template<typename Scalar>
MMat aligator::gar::LqrKnotTpl< Scalar >::Gth

Definition at line 52 of file lqr-problem.hpp.

◆ Gx

template<typename Scalar>
MMat aligator::gar::LqrKnotTpl< Scalar >::Gx

Definition at line 53 of file lqr-problem.hpp.

◆ Gu

template<typename Scalar>
MMat aligator::gar::LqrKnotTpl< Scalar >::Gu

Definition at line 54 of file lqr-problem.hpp.

◆ Gv

template<typename Scalar>
MMat aligator::gar::LqrKnotTpl< Scalar >::Gv

Definition at line 55 of file lqr-problem.hpp.

◆ gamma

template<typename Scalar>
MVec aligator::gar::LqrKnotTpl< Scalar >::gamma

Definition at line 56 of file lqr-problem.hpp.


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