aligator  0.6.1
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 ConstraintType = StageConstraintTpl<Scalar>
 
using value_type = ConstraintType
 
using data_type = ConstraintType
 
using iterator = typename std::vector<ConstraintType>::iterator
 

Public Member Functions

 ALIGATOR_DYNAMIC_TYPEDEFS (Scalar)
 
 ConstraintStackTpl ()
 
auto begin ()
 
auto end ()
 
std::size_t size () const
 
bool empty () const
 
void clear ()
 
void pushBack (const ConstraintType &el, const long nr)
 
void pushBack (const ConstraintType &el)
 
const std::vector< long > & dims () const
 Get the set of dimensions for each constraint in the stack.
 
ALIGATOR_DEPRECATED const std::vector< long > & getDims () const
 
long totalDim () const
 
ConstraintTypeoperator[] (std::size_t j)
 Get the i-th constraint.
 
const ConstraintTypeoperator[] (std::size_t j) const
 Get the i-th constraint.
 

Protected Attributes

std::vector< ConstraintTypestorage_
 
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 20 of file constraint.hpp.

Member Typedef Documentation

◆ ConstraintType

template<typename Scalar >
using aligator::ConstraintStackTpl< Scalar >::ConstraintType = StageConstraintTpl<Scalar>

Definition at line 22 of file constraint.hpp.

◆ value_type

template<typename Scalar >
using aligator::ConstraintStackTpl< Scalar >::value_type = ConstraintType

Definition at line 23 of file constraint.hpp.

◆ data_type

template<typename Scalar >
using aligator::ConstraintStackTpl< Scalar >::data_type = ConstraintType

Definition at line 24 of file constraint.hpp.

◆ iterator

template<typename Scalar >
using aligator::ConstraintStackTpl< Scalar >::iterator = typename std::vector<ConstraintType>::iterator

Definition at line 25 of file constraint.hpp.

Constructor & Destructor Documentation

◆ ConstraintStackTpl()

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

Definition at line 27 of file constraint.hpp.

Member Function Documentation

◆ ALIGATOR_DYNAMIC_TYPEDEFS()

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

◆ begin()

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

Definition at line 29 of file constraint.hpp.

◆ end()

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

Definition at line 30 of file constraint.hpp.

◆ 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 >
void aligator::ConstraintStackTpl< Scalar >::pushBack ( const ConstraintType & el,
const long nr )

◆ pushBack() [2/2]

template<typename Scalar >
void aligator::ConstraintStackTpl< Scalar >::pushBack ( const ConstraintType & el)

◆ 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 40 of file constraint.hpp.

◆ getDims()

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

Definition at line 42 of file constraint.hpp.

◆ totalDim()

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

Definition at line 44 of file constraint.hpp.

◆ operator[]() [1/2]

template<typename Scalar >
ConstraintType & aligator::ConstraintStackTpl< Scalar >::operator[] ( std::size_t j)
inline

Get the i-th constraint.

Definition at line 47 of file constraint.hpp.

◆ operator[]() [2/2]

template<typename Scalar >
const ConstraintType & aligator::ConstraintStackTpl< Scalar >::operator[] ( std::size_t j) const
inline

Get the i-th constraint.

Definition at line 53 of file constraint.hpp.

Member Data Documentation

◆ storage_

template<typename Scalar >
std::vector<ConstraintType> aligator::ConstraintStackTpl< Scalar >::storage_
protected

Definition at line 59 of file constraint.hpp.

◆ indices_

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

Definition at line 60 of file constraint.hpp.

◆ dims_

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

Definition at line 61 of file constraint.hpp.

◆ total_dim_

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

Definition at line 62 of file constraint.hpp.


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