humoto
|
Block matrix basic functions.
t_MatrixType | type of raw matrix |
t_block_rows_num | number of rows in one block |
t_block_cols_num | number of columns in one block |
Definition at line 107 of file blockmatrix_base.h.
#include <blockmatrix_base.h>
Public Types | |
typedef const Eigen::Block< const EIGENTOOLS_DYNAMIC_MATRIX(Scalar) > | ConstDynamicMatrixBlock |
Shorthand for Eigen block. More... | |
typedef TypeDecayed< t_MatrixType >::Type | DecayedRawMatrix |
Raw matrix without 'const' and '&'. More... | |
typedef Eigen::Block< EIGENTOOLS_DYNAMIC_MATRIX(Scalar) > | DynamicMatrixBlock |
Shorthand for Eigen block. More... | |
typedef DecayedRawMatrix::Scalar | Scalar |
Scalar type of raw matrix (from Eigen) More... | |
Public Member Functions | |
DynamicMatrixBlock | column (const std::ptrdiff_t index_col, const std::ptrdiff_t index_row_first, const std::ptrdiff_t index_num_rows) |
Access column of a matrix. More... | |
DynamicMatrixBlock | column (const std::ptrdiff_t index_col, const std::ptrdiff_t index_row_first=0) |
Access column of a matrix. More... | |
ConstDynamicMatrixBlock | column (const std::ptrdiff_t index_col, const std::ptrdiff_t index_row_first, const std::ptrdiff_t index_num_rows) const |
Access column of a matrix. More... | |
ConstDynamicMatrixBlock | column (const std::ptrdiff_t index_col, const std::ptrdiff_t index_row_first=0) const |
Access column of a matrix. More... | |
std::ptrdiff_t | getBlockColsNum () const |
Returns dimension of the matrix block. More... | |
std::ptrdiff_t | getBlockRowsNum () const |
Returns dimension of the matrix block. More... | |
std::ptrdiff_t | getNumberOfBlocksHorizontal () const |
Get number of blocks (horizontal/vertical) More... | |
std::ptrdiff_t | getNumberOfBlocksVertical () const |
Get number of blocks (horizontal/vertical) More... | |
std::ptrdiff_t | getNumberOfColumns () const |
Get total number of rows / columns. More... | |
std::ptrdiff_t | getNumberOfRows () const |
Get total number of rows / columns. More... | |
const DecayedRawMatrix & | getRaw () const |
Get raw matrix. More... | |
void | resize (const std::ptrdiff_t num_blocks_vert, const std::ptrdiff_t num_blocks_hor) |
Resize matrix. More... | |
void | resize (const std::ptrdiff_t num_blocks) |
Resize square matrix. More... | |
DynamicMatrixBlock | row (const std::ptrdiff_t index_row, const std::ptrdiff_t index_col_first, const std::ptrdiff_t index_num_cols) |
Access row of a matrix. More... | |
DynamicMatrixBlock | row (const std::ptrdiff_t index_row, const std::ptrdiff_t index_col_first=0) |
Access row of a matrix. More... | |
ConstDynamicMatrixBlock | row (const std::ptrdiff_t index_row, const std::ptrdiff_t index_col_first, const std::ptrdiff_t index_num_cols) const |
Access row of a matrix. More... | |
ConstDynamicMatrixBlock | row (const std::ptrdiff_t index_row, const std::ptrdiff_t index_col_first=0) const |
Access row of a matrix. More... | |
DecayedRawMatrix | selectRowInBlocksAsMatrix (const std::ptrdiff_t row_in_a_block) |
Selects rows from the matrix. More... | |
template<class t_Derived > | |
void | set (const Eigen::DenseBase< t_Derived > &matrix) |
Set raw matrix. More... | |
void | setBlockSize (const std::ptrdiff_t block_rows_num, const std::ptrdiff_t block_cols_num) |
Returns dimension of the matrix block. More... | |
void | setZero (const std::ptrdiff_t num_blocks_vert, const std::ptrdiff_t num_blocks_hor) |
Resize matrix and initialize it with zeros. More... | |
void | setZero (const std::ptrdiff_t num_blocks) |
Resize square matrix and set it to zero. More... | |
Protected Member Functions | |
BlockMatrixAccessBase (const std::ptrdiff_t block_rows_num=MatrixBlockSizeType::UNDEFINED, const std::ptrdiff_t block_cols_num=MatrixBlockSizeType::UNDEFINED) | |
Default constructor. More... | |
BlockMatrixAccessBase (const DecayedRawMatrix &matrix, const std::ptrdiff_t block_rows_num=MatrixBlockSizeType::UNDEFINED, const std::ptrdiff_t block_cols_num=MatrixBlockSizeType::UNDEFINED) | |
Constructor with matrix initialization. More... | |
BlockMatrixAccessBase (DecayedRawMatrix &matrix, const std::ptrdiff_t block_rows_num=MatrixBlockSizeType::UNDEFINED, const std::ptrdiff_t block_cols_num=MatrixBlockSizeType::UNDEFINED) | |
Constructor with matrix initialization. More... | |
~BlockMatrixAccessBase () | |
Protected destructor: prevent destruction of the child classes through a base pointer. More... | |
void | finalize () |
Compute humber of blocks in matrix and check size consistency. More... | |
void | initializeBlockSize (const std::ptrdiff_t block_rows_num, const std::ptrdiff_t block_cols_num) |
Compute humber of blocks in matrix and check size consistency. More... | |
Protected Attributes | |
std::ptrdiff_t | block_cols_num_ |
std::ptrdiff_t | block_rows_num_ |
t_MatrixType | matrix_ |
std::ptrdiff_t | num_blocks_hor_ |
std::ptrdiff_t | num_blocks_vert_ |
typedef const Eigen::Block< const EIGENTOOLS_DYNAMIC_MATRIX( Scalar ) > etools::BlockMatrixAccessBase< t_MatrixType, t_block_rows_num, t_block_cols_num >::ConstDynamicMatrixBlock |
Shorthand for Eigen block.
Definition at line 120 of file blockmatrix_base.h.
typedef TypeDecayed<t_MatrixType>::Type etools::BlockMatrixAccessBase< t_MatrixType, t_block_rows_num, t_block_cols_num >::DecayedRawMatrix |
Raw matrix without 'const' and '&'.
Definition at line 111 of file blockmatrix_base.h.
typedef Eigen::Block< EIGENTOOLS_DYNAMIC_MATRIX( Scalar ) > etools::BlockMatrixAccessBase< t_MatrixType, t_block_rows_num, t_block_cols_num >::DynamicMatrixBlock |
Shorthand for Eigen block.
Definition at line 117 of file blockmatrix_base.h.
typedef DecayedRawMatrix::Scalar etools::BlockMatrixAccessBase< t_MatrixType, t_block_rows_num, t_block_cols_num >::Scalar |
Scalar type of raw matrix (from Eigen)
Definition at line 114 of file blockmatrix_base.h.
|
inlineprotected |
Protected destructor: prevent destruction of the child classes through a base pointer.
Definition at line 422 of file blockmatrix_base.h.
|
inlineprotected |
Default constructor.
Definition at line 428 of file blockmatrix_base.h.
|
inlineprotected |
Constructor with matrix initialization.
[in] | matrix | matrix |
[in] | block_rows_num | number of rows in a block if t_block_rows_num = MatrixBlockSizeType::DYNAMIC |
[in] | block_cols_num | number of cols in a block if t_block_cols_num = MatrixBlockSizeType::DYNAMIC |
Definition at line 443 of file blockmatrix_base.h.
|
inlineprotected |
Constructor with matrix initialization.
[in] | matrix | matrix |
[in] | block_rows_num | number of rows in a block if t_block_rows_num = MatrixBlockSizeType::DYNAMIC |
[in] | block_cols_num | number of cols in a block if t_block_cols_num = MatrixBlockSizeType::DYNAMIC |
Definition at line 460 of file blockmatrix_base.h.
|
inline |
Access column of a matrix.
[in] | index_col | index of the column |
[in] | index_row_first | segment of the column starts at this row |
[in] | index_num_rows | number of blocks |
Definition at line 238 of file blockmatrix_base.h.
|
inline |
Access column of a matrix.
[in] | index_col | index of the column |
[in] | index_row_first | segment of the column starts at this row if index_row_first is not specified => return the whole column |
Definition at line 260 of file blockmatrix_base.h.
|
inline |
Access column of a matrix.
[in] | index_col | index of the column |
[in] | index_row_first | segment of the column starts at this row |
[in] | index_num_rows | number of blocks |
Definition at line 268 of file blockmatrix_base.h.
|
inline |
Access column of a matrix.
[in] | index_col | index of the column |
[in] | index_row_first | segment of the column starts at this row if index_row_first is not specified => return the whole column |
Definition at line 281 of file blockmatrix_base.h.
|
inlineprotected |
Compute humber of blocks in matrix and check size consistency.
Definition at line 504 of file blockmatrix_base.h.
|
inline |
Returns dimension of the matrix block.
Definition at line 384 of file blockmatrix_base.h.
|
inline |
Returns dimension of the matrix block.
Definition at line 377 of file blockmatrix_base.h.
|
inline |
Get number of blocks (horizontal/vertical)
Definition at line 136 of file blockmatrix_base.h.
|
inline |
Get number of blocks (horizontal/vertical)
Definition at line 129 of file blockmatrix_base.h.
|
inline |
Get total number of rows / columns.
Definition at line 155 of file blockmatrix_base.h.
|
inline |
Get total number of rows / columns.
Definition at line 148 of file blockmatrix_base.h.
|
inline |
|
inlineprotected |
Compute humber of blocks in matrix and check size consistency.
Definition at line 474 of file blockmatrix_base.h.
|
inline |
Resize matrix.
[in] | num_blocks_vert | |
[in] | num_blocks_hor |
Definition at line 182 of file blockmatrix_base.h.
|
inline |
Resize square matrix.
[in] | num_blocks | number of diagonal blocks |
Definition at line 211 of file blockmatrix_base.h.
|
inline |
Access row of a matrix.
[in] | index_row | index of the row |
[in] | index_col_first | segment of the row starts at this column |
[in] | index_num_cols | number of blocks |
Definition at line 297 of file blockmatrix_base.h.
|
inline |
Access row of a matrix.
[in] | index_row | index of the row |
[in] | index_col_first | segment of the row starts at this column if index_col_first is not specified => return the whole row |
Definition at line 319 of file blockmatrix_base.h.
|
inline |
Access row of a matrix.
[in] | index_row | index of the row |
[in] | index_col_first | segment of the row starts at this column |
[in] | index_num_cols | number of blocks |
Definition at line 327 of file blockmatrix_base.h.
|
inline |
Access row of a matrix.
[in] | index_row | index of the row |
[in] | index_col_first | segment of the row starts at this column if index_col_first is not specified => return the whole row |
Definition at line 340 of file blockmatrix_base.h.
|
inline |
Selects rows from the matrix.
[in] | row_in_a_block | row number in a block |
Definition at line 366 of file blockmatrix_base.h.
|
inline |
Set raw matrix.
t_Derived | Eigen parameter |
[in] | matrix |
Definition at line 169 of file blockmatrix_base.h.
|
inline |
Returns dimension of the matrix block.
Definition at line 395 of file blockmatrix_base.h.
|
inline |
Resize matrix and initialize it with zeros.
[in] | num_blocks_vert | |
[in] | num_blocks_hor |
Definition at line 197 of file blockmatrix_base.h.
|
inline |
Resize square matrix and set it to zero.
[in] | num_blocks | number of diagonal blocks |
Definition at line 222 of file blockmatrix_base.h.
|
protected |
Definition at line 414 of file blockmatrix_base.h.
|
protected |
Definition at line 413 of file blockmatrix_base.h.
|
protected |
Definition at line 408 of file blockmatrix_base.h.
|
protected |
Definition at line 411 of file blockmatrix_base.h.
|
protected |
Definition at line 410 of file blockmatrix_base.h.