aligator  0.9.0
A primal-dual augmented Lagrangian-type solver for nonlinear trajectory optimization.
Loading...
Searching...
No Matches
aligator::BlkMatrix< _MatrixType, _N, _M > Class Template Reference

Block matrix class, with a fixed-size number of row and column blocks. More...

#include </home/runner/work/aligator/aligator/gar/include/aligator/gar/blk-matrix.hpp>

Public Types

enum  { N = _N , M = _M , Options = PlainObject::Options }
 
using MatrixType = _MatrixType
 
using PlainObject = typename MatrixType::PlainObject
 
using Scalar = typename MatrixType::Scalar
 
using row_dim_t
 
using col_dim_t
 

Public Member Functions

 BlkMatrix ()
 
 BlkMatrix (const row_dim_t &rowDims, const col_dim_t &colDims)
 
template<typename Other >
 BlkMatrix (const Eigen::MatrixBase< Other > &data, const row_dim_t &rowDims, const col_dim_t &colDims)
 
template<typename Other >
 BlkMatrix (Eigen::MatrixBase< Other > &data, const row_dim_t &rowDims, const col_dim_t &colDims)
 
template<typename Other >
 BlkMatrix (const Eigen::MatrixBase< Other > &data, const row_dim_t &dims)
 Only-rows constructor (only for vectors)
 
template<typename Other >
 BlkMatrix (Eigen::MatrixBase< Other > &data, const row_dim_t &dims)
 Only-rows constructor (only for vectors)
 
 BlkMatrix (const row_dim_t &dims)
 Only-rows constructor (only for vectors)
 
auto operator() (size_t i, size_t j)
 Get the block in position ( i, j )
 
auto operator() (size_t i, size_t j) const
 
auto blockRow (size_t i)
 
auto blockRow (size_t i) const
 
auto blockCol (size_t j) const
 
auto blockCol (size_t j)
 
auto blockSegment (size_t i)
 
auto blockSegment (size_t i) const
 
auto operator[] (size_t i)
 
auto operator[] (size_t i) const
 
template<typename Other >
BlkMatrixoperator= (const Eigen::MatrixBase< Other > &other)
 Set the data to be equal to some other Eigen object.
 
void setZero ()
 
template<typename Other >
void swap (BlkMatrix< Other, N, M > &other)
 
MatrixTypematrix ()
 
const MatrixTypematrix () const
 
const row_dim_trowDims () const
 
const row_dim_trowIndices () const
 
const col_dim_tcolDims () const
 
const col_dim_tcolIndices () const
 
long rows () const
 
long cols () const
 
auto topBlkRows (size_t n)
 
template<size_t n>
auto topBlkRows ()
 

Static Public Member Functions

static BlkMatrix Zero (const row_dim_t &rowDims, const col_dim_t &colDims)
 

Protected Member Functions

 BlkMatrix (const row_dim_t &dims, std::true_type)
 
 BlkMatrix (const row_dim_t &dims, std::false_type)
 
void initialize ()
 

Protected Attributes

MatrixType m_data
 
row_dim_t m_rowDims
 
col_dim_t m_colDims
 
row_dim_t m_rowIndices
 
col_dim_t m_colIndices
 
long m_totalRows
 
long m_totalCols
 

Friends

std::ostream & operator<< (std::ostream &oss, const BlkMatrix &self)
 

Detailed Description

template<typename _MatrixType, int _N, int _M = _N>
class aligator::BlkMatrix< _MatrixType, _N, _M >

Block matrix class, with a fixed-size number of row and column blocks.

Definition at line 13 of file blk-matrix.hpp.

Member Typedef Documentation

◆ MatrixType

template<typename _MatrixType , int _N, int _M = _N>
using aligator::BlkMatrix< _MatrixType, _N, _M >::MatrixType = _MatrixType

Definition at line 15 of file blk-matrix.hpp.

◆ PlainObject

template<typename _MatrixType , int _N, int _M = _N>
using aligator::BlkMatrix< _MatrixType, _N, _M >::PlainObject = typename MatrixType::PlainObject

Definition at line 16 of file blk-matrix.hpp.

◆ Scalar

template<typename _MatrixType , int _N, int _M = _N>
using aligator::BlkMatrix< _MatrixType, _N, _M >::Scalar = typename MatrixType::Scalar

Definition at line 17 of file blk-matrix.hpp.

◆ row_dim_t

template<typename _MatrixType , int _N, int _M = _N>
using aligator::BlkMatrix< _MatrixType, _N, _M >::row_dim_t
Initial value:
std::conditional_t<N != -1, std::array<long, size_t(N)>,
std::vector<long>>

Definition at line 20 of file blk-matrix.hpp.

◆ col_dim_t

template<typename _MatrixType , int _N, int _M = _N>
using aligator::BlkMatrix< _MatrixType, _N, _M >::col_dim_t
Initial value:
std::conditional_t<M != -1, std::array<long, size_t(M)>,
std::vector<long>>

Definition at line 22 of file blk-matrix.hpp.

Member Enumeration Documentation

◆ anonymous enum

template<typename _MatrixType , int _N, int _M = _N>
anonymous enum
Enumerator
Options 

Definition at line 18 of file blk-matrix.hpp.

Constructor & Destructor Documentation

◆ BlkMatrix() [1/9]

template<typename _MatrixType , int _N, int _M = _N>
aligator::BlkMatrix< _MatrixType, _N, _M >::BlkMatrix ( )
inline

Definition at line 32 of file blk-matrix.hpp.

◆ BlkMatrix() [2/9]

template<typename _MatrixType , int _N, int _M = _N>
aligator::BlkMatrix< _MatrixType, _N, _M >::BlkMatrix ( const row_dim_t & rowDims,
const col_dim_t & colDims )
inline

Definition at line 36 of file blk-matrix.hpp.

◆ BlkMatrix() [3/9]

template<typename _MatrixType , int _N, int _M = _N>
template<typename Other >
aligator::BlkMatrix< _MatrixType, _N, _M >::BlkMatrix ( const Eigen::MatrixBase< Other > & data,
const row_dim_t & rowDims,
const col_dim_t & colDims )
inline

Definition at line 44 of file blk-matrix.hpp.

◆ BlkMatrix() [4/9]

template<typename _MatrixType , int _N, int _M = _N>
template<typename Other >
aligator::BlkMatrix< _MatrixType, _N, _M >::BlkMatrix ( Eigen::MatrixBase< Other > & data,
const row_dim_t & rowDims,
const col_dim_t & colDims )
inline

Definition at line 53 of file blk-matrix.hpp.

◆ BlkMatrix() [5/9]

template<typename _MatrixType , int _N, int _M = _N>
template<typename Other >
aligator::BlkMatrix< _MatrixType, _N, _M >::BlkMatrix ( const Eigen::MatrixBase< Other > & data,
const row_dim_t & dims )
inline

Only-rows constructor (only for vectors)

Definition at line 63 of file blk-matrix.hpp.

◆ BlkMatrix() [6/9]

template<typename _MatrixType , int _N, int _M = _N>
template<typename Other >
aligator::BlkMatrix< _MatrixType, _N, _M >::BlkMatrix ( Eigen::MatrixBase< Other > & data,
const row_dim_t & dims )
inline

Only-rows constructor (only for vectors)

Definition at line 68 of file blk-matrix.hpp.

◆ BlkMatrix() [7/9]

template<typename _MatrixType , int _N, int _M = _N>
aligator::BlkMatrix< _MatrixType, _N, _M >::BlkMatrix ( const row_dim_t & dims)
inlineexplicit

Only-rows constructor (only for vectors)

Definition at line 72 of file blk-matrix.hpp.

◆ BlkMatrix() [8/9]

template<typename _MatrixType , int _N, int _M = _N>
aligator::BlkMatrix< _MatrixType, _N, _M >::BlkMatrix ( const row_dim_t & dims,
std::true_type  )
inlineexplicitprotected

Definition at line 181 of file blk-matrix.hpp.

◆ BlkMatrix() [9/9]

template<typename _MatrixType , int _N, int _M = _N>
aligator::BlkMatrix< _MatrixType, _N, _M >::BlkMatrix ( const row_dim_t & dims,
std::false_type  )
inlineexplicitprotected

Definition at line 183 of file blk-matrix.hpp.

Member Function Documentation

◆ operator()() [1/2]

template<typename _MatrixType , int _N, int _M = _N>
auto aligator::BlkMatrix< _MatrixType, _N, _M >::operator() ( size_t i,
size_t j )
inline

Get the block in position ( i, j )

Definition at line 75 of file blk-matrix.hpp.

◆ operator()() [2/2]

template<typename _MatrixType , int _N, int _M = _N>
auto aligator::BlkMatrix< _MatrixType, _N, _M >::operator() ( size_t i,
size_t j ) const
inline

Definition at line 81 of file blk-matrix.hpp.

◆ blockRow() [1/2]

template<typename _MatrixType , int _N, int _M = _N>
auto aligator::BlkMatrix< _MatrixType, _N, _M >::blockRow ( size_t i)
inline

Definition at line 86 of file blk-matrix.hpp.

◆ blockRow() [2/2]

template<typename _MatrixType , int _N, int _M = _N>
auto aligator::BlkMatrix< _MatrixType, _N, _M >::blockRow ( size_t i) const
inline

Definition at line 90 of file blk-matrix.hpp.

◆ blockCol() [1/2]

template<typename _MatrixType , int _N, int _M = _N>
auto aligator::BlkMatrix< _MatrixType, _N, _M >::blockCol ( size_t j) const
inline

Definition at line 94 of file blk-matrix.hpp.

◆ blockCol() [2/2]

template<typename _MatrixType , int _N, int _M = _N>
auto aligator::BlkMatrix< _MatrixType, _N, _M >::blockCol ( size_t j)
inline

Definition at line 98 of file blk-matrix.hpp.

◆ blockSegment() [1/2]

template<typename _MatrixType , int _N, int _M = _N>
auto aligator::BlkMatrix< _MatrixType, _N, _M >::blockSegment ( size_t i)
inline

Definition at line 102 of file blk-matrix.hpp.

◆ blockSegment() [2/2]

template<typename _MatrixType , int _N, int _M = _N>
auto aligator::BlkMatrix< _MatrixType, _N, _M >::blockSegment ( size_t i) const
inline

Definition at line 107 of file blk-matrix.hpp.

◆ operator[]() [1/2]

template<typename _MatrixType , int _N, int _M = _N>
auto aligator::BlkMatrix< _MatrixType, _N, _M >::operator[] ( size_t i)
inline

Definition at line 112 of file blk-matrix.hpp.

◆ operator[]() [2/2]

template<typename _MatrixType , int _N, int _M = _N>
auto aligator::BlkMatrix< _MatrixType, _N, _M >::operator[] ( size_t i) const
inline

Definition at line 114 of file blk-matrix.hpp.

◆ operator=()

template<typename _MatrixType , int _N, int _M = _N>
template<typename Other >
BlkMatrix & aligator::BlkMatrix< _MatrixType, _N, _M >::operator= ( const Eigen::MatrixBase< Other > & other)
inline

Set the data to be equal to some other Eigen object.

Definition at line 118 of file blk-matrix.hpp.

◆ setZero()

template<typename _MatrixType , int _N, int _M = _N>
void aligator::BlkMatrix< _MatrixType, _N, _M >::setZero ( )
inline

Definition at line 125 of file blk-matrix.hpp.

◆ Zero()

template<typename _MatrixType , int _N, int _M = _N>
static BlkMatrix aligator::BlkMatrix< _MatrixType, _N, _M >::Zero ( const row_dim_t & rowDims,
const col_dim_t & colDims )
inlinestatic

Definition at line 126 of file blk-matrix.hpp.

◆ swap()

template<typename _MatrixType , int _N, int _M = _N>
template<typename Other >
void aligator::BlkMatrix< _MatrixType, _N, _M >::swap ( BlkMatrix< Other, N, M > & other)
inline

Definition at line 133 of file blk-matrix.hpp.

◆ matrix() [1/2]

template<typename _MatrixType , int _N, int _M = _N>
MatrixType & aligator::BlkMatrix< _MatrixType, _N, _M >::matrix ( )
inline

Definition at line 137 of file blk-matrix.hpp.

◆ matrix() [2/2]

template<typename _MatrixType , int _N, int _M = _N>
const MatrixType & aligator::BlkMatrix< _MatrixType, _N, _M >::matrix ( ) const
inline

Definition at line 138 of file blk-matrix.hpp.

◆ rowDims()

template<typename _MatrixType , int _N, int _M = _N>
const row_dim_t & aligator::BlkMatrix< _MatrixType, _N, _M >::rowDims ( ) const
inline

Definition at line 140 of file blk-matrix.hpp.

◆ rowIndices()

template<typename _MatrixType , int _N, int _M = _N>
const row_dim_t & aligator::BlkMatrix< _MatrixType, _N, _M >::rowIndices ( ) const
inline

Definition at line 141 of file blk-matrix.hpp.

◆ colDims()

template<typename _MatrixType , int _N, int _M = _N>
const col_dim_t & aligator::BlkMatrix< _MatrixType, _N, _M >::colDims ( ) const
inline

Definition at line 142 of file blk-matrix.hpp.

◆ colIndices()

template<typename _MatrixType , int _N, int _M = _N>
const col_dim_t & aligator::BlkMatrix< _MatrixType, _N, _M >::colIndices ( ) const
inline

Definition at line 143 of file blk-matrix.hpp.

◆ rows()

template<typename _MatrixType , int _N, int _M = _N>
long aligator::BlkMatrix< _MatrixType, _N, _M >::rows ( ) const
inline

Definition at line 145 of file blk-matrix.hpp.

◆ cols()

template<typename _MatrixType , int _N, int _M = _N>
long aligator::BlkMatrix< _MatrixType, _N, _M >::cols ( ) const
inline

Definition at line 146 of file blk-matrix.hpp.

◆ topBlkRows() [1/2]

template<typename _MatrixType , int _N, int _M = _N>
auto aligator::BlkMatrix< _MatrixType, _N, _M >::topBlkRows ( size_t n)
inline

Definition at line 148 of file blk-matrix.hpp.

◆ topBlkRows() [2/2]

template<typename _MatrixType , int _N, int _M = _N>
template<size_t n>
auto aligator::BlkMatrix< _MatrixType, _N, _M >::topBlkRows ( )
inline

Definition at line 157 of file blk-matrix.hpp.

◆ initialize()

template<typename _MatrixType , int _N, int _M = _N>
void aligator::BlkMatrix< _MatrixType, _N, _M >::initialize ( )
inlineprotected

Definition at line 186 of file blk-matrix.hpp.

Friends And Related Symbol Documentation

◆ operator<<

template<typename _MatrixType , int _N, int _M = _N>
std::ostream & operator<< ( std::ostream & oss,
const BlkMatrix< _MatrixType, _N, _M > & self )
friend

Definition at line 168 of file blk-matrix.hpp.

Member Data Documentation

◆ m_data

template<typename _MatrixType , int _N, int _M = _N>
MatrixType aligator::BlkMatrix< _MatrixType, _N, _M >::m_data
protected

Definition at line 173 of file blk-matrix.hpp.

◆ m_rowDims

template<typename _MatrixType , int _N, int _M = _N>
row_dim_t aligator::BlkMatrix< _MatrixType, _N, _M >::m_rowDims
protected

Definition at line 174 of file blk-matrix.hpp.

◆ m_colDims

template<typename _MatrixType , int _N, int _M = _N>
col_dim_t aligator::BlkMatrix< _MatrixType, _N, _M >::m_colDims
protected

Definition at line 175 of file blk-matrix.hpp.

◆ m_rowIndices

template<typename _MatrixType , int _N, int _M = _N>
row_dim_t aligator::BlkMatrix< _MatrixType, _N, _M >::m_rowIndices
protected

Definition at line 176 of file blk-matrix.hpp.

◆ m_colIndices

template<typename _MatrixType , int _N, int _M = _N>
col_dim_t aligator::BlkMatrix< _MatrixType, _N, _M >::m_colIndices
protected

Definition at line 177 of file blk-matrix.hpp.

◆ m_totalRows

template<typename _MatrixType , int _N, int _M = _N>
long aligator::BlkMatrix< _MatrixType, _N, _M >::m_totalRows
protected

Definition at line 178 of file blk-matrix.hpp.

◆ m_totalCols

template<typename _MatrixType , int _N, int _M = _N>
long aligator::BlkMatrix< _MatrixType, _N, _M >::m_totalCols
protected

Definition at line 179 of file blk-matrix.hpp.


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