humoto
|
Extra layer for handling of specific sizes of blocks using partial template specialization.
Access matrix using 1x1 blocks. The reason for this is that Eigen does not support Block's of such size.
t_MatrixType | type of raw matrix, e.g. Eigen::MatrixXd or a reference to it |
Definition at line 743 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 BlockMatrixAccessBase< t_MatrixType, 1, 1 >::DecayedRawMatrix | DecayedRawMatrix |
typedef Eigen::Block< EIGENTOOLS_DYNAMIC_MATRIX(Scalar) > | DynamicMatrixBlock |
Shorthand for Eigen block. More... | |
typedef BlockMatrixAccessBase< t_MatrixType, 1, 1 >::Scalar | Scalar |
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... | |
Scalar & | operator() (const std::ptrdiff_t index_row, const std::ptrdiff_t index_col) |
Block access operator. More... | |
Scalar | operator() (const std::ptrdiff_t index_row, const std::ptrdiff_t index_col) const |
Block access operator. More... | |
Scalar & | operator() (const std::ptrdiff_t index) |
Block access operator for diagonal blocks. More... | |
Scalar | operator() (const std::ptrdiff_t index) const |
Block access operator for diagonal blocks. 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... | |
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 | |
BlockMatrixSizeSpecificBase (const std::ptrdiff_t block_rows_num=MatrixBlockSizeType::UNDEFINED, const std::ptrdiff_t block_cols_num=MatrixBlockSizeType::UNDEFINED) | |
BlockMatrixSizeSpecificBase (DecayedRawMatrix &matrix, const std::ptrdiff_t block_rows_num=MatrixBlockSizeType::UNDEFINED, const std::ptrdiff_t block_cols_num=MatrixBlockSizeType::UNDEFINED) | |
BlockMatrixSizeSpecificBase (const DecayedRawMatrix &matrix, const std::ptrdiff_t block_rows_num=MatrixBlockSizeType::UNDEFINED, const std::ptrdiff_t block_cols_num=MatrixBlockSizeType::UNDEFINED) | |
~BlockMatrixSizeSpecificBase () | |
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_ |
|
inherited |
Shorthand for Eigen block.
Definition at line 120 of file blockmatrix_base.h.
typedef BlockMatrixAccessBase<t_MatrixType, 1, 1>::DecayedRawMatrix etools::BlockMatrixSizeSpecificBase< t_MatrixType, 1, 1 >::DecayedRawMatrix |
Definition at line 746 of file blockmatrix_base.h.
|
inherited |
Shorthand for Eigen block.
Definition at line 117 of file blockmatrix_base.h.
typedef BlockMatrixAccessBase<t_MatrixType, 1, 1>::Scalar etools::BlockMatrixSizeSpecificBase< t_MatrixType, 1, 1 >::Scalar |
Definition at line 747 of file blockmatrix_base.h.
|
inlineprotected |
Protected destructor: prevent destruction of the child classes through a base pointer.
Definition at line 801 of file blockmatrix_base.h.
|
inlineprotected |
Definition at line 804 of file blockmatrix_base.h.
|
inlineprotected |
Definition at line 804 of file blockmatrix_base.h.
|
inlineprotected |
Definition at line 804 of file blockmatrix_base.h.
|
inlineinherited |
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.
|
inlineinherited |
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.
|
inlineinherited |
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.
|
inlineinherited |
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.
|
inlineprotectedinherited |
Compute humber of blocks in matrix and check size consistency.
Definition at line 504 of file blockmatrix_base.h.
|
inlineinherited |
Returns dimension of the matrix block.
Definition at line 384 of file blockmatrix_base.h.
|
inlineinherited |
Returns dimension of the matrix block.
Definition at line 377 of file blockmatrix_base.h.
|
inlineinherited |
Get number of blocks (horizontal/vertical)
Definition at line 136 of file blockmatrix_base.h.
|
inlineinherited |
Get number of blocks (horizontal/vertical)
Definition at line 129 of file blockmatrix_base.h.
|
inlineinherited |
Get total number of rows / columns.
Definition at line 155 of file blockmatrix_base.h.
|
inlineinherited |
Get total number of rows / columns.
Definition at line 148 of file blockmatrix_base.h.
|
inlineinherited |
|
inlineprotectedinherited |
Compute humber of blocks in matrix and check size consistency.
Definition at line 474 of file blockmatrix_base.h.
|
inline |
Block access operator.
[in] | index_row | |
[in] | index_col |
Definition at line 758 of file blockmatrix_base.h.
|
inline |
Block access operator.
[in] | index_row | |
[in] | index_col |
Definition at line 766 of file blockmatrix_base.h.
|
inline |
Block access operator for diagonal blocks.
[in] | index | row and column index |
Definition at line 780 of file blockmatrix_base.h.
|
inline |
Block access operator for diagonal blocks.
[in] | index | row and column index |
Definition at line 787 of file blockmatrix_base.h.
|
inlineinherited |
Resize matrix.
[in] | num_blocks_vert | |
[in] | num_blocks_hor |
Definition at line 182 of file blockmatrix_base.h.
|
inlineinherited |
Resize square matrix.
[in] | num_blocks | number of diagonal blocks |
Definition at line 211 of file blockmatrix_base.h.
|
inlineinherited |
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.
|
inlineinherited |
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.
|
inlineinherited |
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.
|
inlineinherited |
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.
|
inlineinherited |
Selects rows from the matrix.
[in] | row_in_a_block | row number in a block |
Definition at line 366 of file blockmatrix_base.h.
|
inlineinherited |
Set raw matrix.
t_Derived | Eigen parameter |
[in] | matrix |
Definition at line 169 of file blockmatrix_base.h.
|
inlineinherited |
Returns dimension of the matrix block.
Definition at line 395 of file blockmatrix_base.h.
|
inlineinherited |
Resize matrix and initialize it with zeros.
[in] | num_blocks_vert | |
[in] | num_blocks_hor |
Definition at line 197 of file blockmatrix_base.h.
|
inlineinherited |
Resize square matrix and set it to zero.
[in] | num_blocks | number of diagonal blocks |
Definition at line 222 of file blockmatrix_base.h.
|
protectedinherited |
Definition at line 414 of file blockmatrix_base.h.
|
protectedinherited |
Definition at line 413 of file blockmatrix_base.h.
|
protectedinherited |
Definition at line 408 of file blockmatrix_base.h.
|
protectedinherited |
Definition at line 411 of file blockmatrix_base.h.
|
protectedinherited |
Definition at line 410 of file blockmatrix_base.h.