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

Convenience class to manage a stack of constraints. More...

#include <aligator/core/constraint.hpp>

Collaboration diagram for aligator::ConstraintStackTpl< Scalar >:
[legend]

Public Types

using PolyFunc = xyz::polymorphic<StageFunctionTpl<Scalar>>
 
using PolySet = xyz::polymorphic<ConstraintSetTpl<Scalar>>
 

Public Member Functions

 ALIGATOR_DYNAMIC_TYPEDEFS (Scalar)
 
 ConstraintStackTpl ()
 
 ConstraintStackTpl (const ConstraintStackTpl &)=default
 
ConstraintStackTploperator= (const ConstraintStackTpl &)=default
 
 ConstraintStackTpl (ConstraintStackTpl &&)=default
 
ConstraintStackTploperator= (ConstraintStackTpl &&)=default
 
std::size_t size () const
 
bool empty () const
 
void clear ()
 
template<typename Cstr >
ALIGATOR_DEPRECATED void pushBack (Cstr &&el)
 
void pushBack (const PolyFunc &func, const PolySet &cstr_set)
 
const std::vector< long > & dims () const
 Get the set of dimensions for each constraint in the stack.
 
long totalDim () const
 
template<typename Derived >
Derived * getConstraint (const size_t id)
 Get constraint function, cast down to the specified type.
 
template<typename Derived >
const Derived * getConstraint (const size_t id) const
 Get constraint function, cast down to the specified type.
 

Public Attributes

std::vector< PolyFuncfuncs
 
std::vector< PolySetsets
 

Protected Attributes

std::vector< long > indices_
 
std::vector< long > dims_
 
long total_dim_ = 0
 

Detailed Description

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

Convenience class to manage a stack of constraints.

Definition at line 104 of file fwd.hpp.

Member Typedef Documentation

◆ PolyFunc

template<typename Scalar >
using aligator::ConstraintStackTpl< Scalar >::PolyFunc = xyz::polymorphic<StageFunctionTpl<Scalar>>

Definition at line 23 of file constraint.hpp.

◆ PolySet

template<typename Scalar >
using aligator::ConstraintStackTpl< Scalar >::PolySet = xyz::polymorphic<ConstraintSetTpl<Scalar>>

Definition at line 24 of file constraint.hpp.

Constructor & Destructor Documentation

◆ ConstraintStackTpl() [1/3]

template<typename Scalar >
aligator::ConstraintStackTpl< Scalar >::ConstraintStackTpl ( )
inline

Definition at line 26 of file constraint.hpp.

◆ ConstraintStackTpl() [2/3]

template<typename Scalar >
aligator::ConstraintStackTpl< Scalar >::ConstraintStackTpl ( const ConstraintStackTpl< Scalar > & )
default

◆ ConstraintStackTpl() [3/3]

template<typename Scalar >
aligator::ConstraintStackTpl< Scalar >::ConstraintStackTpl ( ConstraintStackTpl< Scalar > && )
default

Member Function Documentation

◆ ALIGATOR_DYNAMIC_TYPEDEFS()

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

◆ operator=() [1/2]

template<typename Scalar >
ConstraintStackTpl & aligator::ConstraintStackTpl< Scalar >::operator= ( const ConstraintStackTpl< Scalar > & )
default

◆ operator=() [2/2]

template<typename Scalar >
ConstraintStackTpl & aligator::ConstraintStackTpl< Scalar >::operator= ( ConstraintStackTpl< Scalar > && )
default

◆ size()

template<typename Scalar >
std::size_t aligator::ConstraintStackTpl< Scalar >::size ( ) const
inline

Definition at line 32 of file constraint.hpp.

◆ empty()

template<typename Scalar >
bool aligator::ConstraintStackTpl< Scalar >::empty ( ) const
inline

Definition at line 33 of file constraint.hpp.

◆ clear()

template<typename Scalar >
void aligator::ConstraintStackTpl< Scalar >::clear ( )

◆ pushBack() [1/2]

template<typename Scalar >
template<typename Cstr >
ALIGATOR_DEPRECATED void aligator::ConstraintStackTpl< Scalar >::pushBack ( Cstr && el)
inline

Definition at line 36 of file constraint.hpp.

◆ pushBack() [2/2]

template<typename Scalar >
void aligator::ConstraintStackTpl< Scalar >::pushBack ( const PolyFunc & func,
const PolySet & cstr_set )
inline

Definition at line 46 of file constraint.hpp.

◆ dims()

template<typename Scalar >
const std::vector< long > & aligator::ConstraintStackTpl< Scalar >::dims ( ) const
inline

Get the set of dimensions for each constraint in the stack.

Definition at line 57 of file constraint.hpp.

◆ totalDim()

template<typename Scalar >
long aligator::ConstraintStackTpl< Scalar >::totalDim ( ) const
inline

Definition at line 59 of file constraint.hpp.

◆ getConstraint() [1/2]

template<typename Scalar >
template<typename Derived >
Derived * aligator::ConstraintStackTpl< Scalar >::getConstraint ( const size_t id)
inline

Get constraint function, cast down to the specified type.

Definition at line 62 of file constraint.hpp.

◆ getConstraint() [2/2]

template<typename Scalar >
template<typename Derived >
const Derived * aligator::ConstraintStackTpl< Scalar >::getConstraint ( const size_t id) const
inline

Get constraint function, cast down to the specified type.

Definition at line 68 of file constraint.hpp.

Member Data Documentation

◆ funcs

template<typename Scalar >
std::vector<PolyFunc> aligator::ConstraintStackTpl< Scalar >::funcs

Definition at line 72 of file constraint.hpp.

◆ sets

template<typename Scalar >
std::vector<PolySet> aligator::ConstraintStackTpl< Scalar >::sets

Definition at line 73 of file constraint.hpp.

◆ indices_

template<typename Scalar >
std::vector<long> aligator::ConstraintStackTpl< Scalar >::indices_
protected

Definition at line 76 of file constraint.hpp.

◆ dims_

template<typename Scalar >
std::vector<long> aligator::ConstraintStackTpl< Scalar >::dims_
protected

Definition at line 77 of file constraint.hpp.

◆ total_dim_

template<typename Scalar >
long aligator::ConstraintStackTpl< Scalar >::total_dim_ = 0
protected

Definition at line 78 of file constraint.hpp.


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