This class stores a dense matrix and allows it to be accessed as a collection of vertical blocks.
The dimensions of the blocks are provided when constructing this class.
This class also has three parameters that can be changed after construction that change the apparent view of the matrix without any reallocation or data copying. firstBlock() determines the block that has index 0 for all operations (except for re-setting firstBlock()). rowStart() determines the apparent first row of the matrix for all operations (except for setting rowStart() and rowEnd()). rowEnd() determines the apparent exclusive (one-past-the-last) last row for all operations. To include all rows, rowEnd() should be set to the number of rows in the matrix (i.e. one after the last true row index).
|
| VerticalBlockMatrix () |
| Construct an empty VerticalBlockMatrix.
|
|
template<typename CONTAINER > |
| VerticalBlockMatrix (const CONTAINER &dimensions, DenseIndex height, bool appendOneDimension=false) |
| Construct from a container of the sizes of each vertical block.
|
|
template<typename CONTAINER , typename DERIVED > |
| VerticalBlockMatrix (const CONTAINER &dimensions, const Eigen::MatrixBase< DERIVED > &matrix, bool appendOneDimension=false) |
| Construct from a container of the sizes of each vertical block and a pre-prepared matrix.
|
|
template<typename ITERATOR > |
| VerticalBlockMatrix (ITERATOR firstBlockDim, ITERATOR lastBlockDim, DenseIndex height, bool appendOneDimension=false) |
| Construct from iterator over the sizes of each vertical block.
|
|
DenseIndex | rows () const |
| Row size.
|
|
DenseIndex | cols () const |
| Column size.
|
|
DenseIndex | nBlocks () const |
| Block count.
|
|
Block | operator() (DenseIndex block) |
| Access a single block in the underlying matrix with read/write access.
|
|
const constBlock | operator() (DenseIndex block) const |
| Access a const block view.
|
|
Block | range (DenseIndex startBlock, DenseIndex endBlock) |
| access ranges of blocks at a time
|
|
const constBlock | range (DenseIndex startBlock, DenseIndex endBlock) const |
|
Block | full () |
| Return the full matrix, not including any portions excluded by rowStart(), rowEnd(), and firstBlock()
|
|
const constBlock | full () const |
| Return the full matrix, not including any portions excluded by rowStart(), rowEnd(), and firstBlock()
|
|
DenseIndex | offset (DenseIndex block) const |
|
const DenseIndex & | rowStart () const |
| Get the apparent first row of the underlying matrix for all operations.
|
|
DenseIndex & | rowStart () |
| Get or set the apparent first row of the underlying matrix for all operations.
|
|
const DenseIndex & | rowEnd () const |
| Get the apparent last row (exclusive, i.e.
|
|
DenseIndex & | rowEnd () |
| Get or set the apparent last row (exclusive, i.e.
|
|
const DenseIndex & | firstBlock () const |
| Get the apparent first block for all operations.
|
|
DenseIndex & | firstBlock () |
| Get or set the apparent first block for all operations.
|
|
const Matrix & | matrix () const |
| Access to full matrix (including any portions excluded by rowStart(), rowEnd(), and firstBlock())
|
|
Matrix & | matrix () |
| Non-const access to full matrix (including any portions excluded by rowStart(), rowEnd(), and firstBlock())
|
|
Copy the block structure and resize the underlying matrix, but do not copy the matrix data.
If blockStart(), rowStart(), and/or rowEnd() have been modified, this copies the structure of the corresponding matrix view. In the destination VerticalBlockView, blockStart() and rowStart() will thus be 0, rowEnd() will be cols() of the source VerticalBlockView, and the underlying matrix will be the size of the view of the source matrix.