gtsam  4.0.0
gtsam
gtsam::VerticalBlockMatrix Class Reference

Public Member Functions

 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. More...
 
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. More...
 
template<typename ITERATOR >
 VerticalBlockMatrix (ITERATOR firstBlockDim, ITERATOR lastBlockDim, DenseIndex height, bool appendOneDimension=false)
 Construct from iterator over the sizes of each vertical block. More...
 
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 DenseIndexrowStart () const
 Get the apparent first row of the underlying matrix for all operations.
 
DenseIndexrowStart ()
 Get or set the apparent first row of the underlying matrix for all operations.
 
const DenseIndexrowEnd () const
 Get the apparent last row (exclusive, i.e. More...
 
DenseIndexrowEnd ()
 Get or set the apparent last row (exclusive, i.e. More...
 
const DenseIndexfirstBlock () const
 Get the apparent first block for all operations.
 
DenseIndexfirstBlock ()
 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())
 

Static Public Member Functions

static VerticalBlockMatrix LikeActiveViewOf (const VerticalBlockMatrix &rhs)
 Copy the block structure and resize the underlying matrix, but do not copy the matrix data. More...
 
static VerticalBlockMatrix LikeActiveViewOf (const SymmetricBlockMatrix &rhs, DenseIndex height)
 Copy the block structure, but do not copy the matrix data. More...
 

Public Types

typedef VerticalBlockMatrix This
 
typedef Eigen::Block< Matrix > Block
 
typedef Eigen::Block< const Matrix > constBlock
 

Protected Member Functions

void assertInvariants () const
 
void checkBlock (DenseIndex block) const
 
template<typename ITERATOR >
void fillOffsets (ITERATOR firstBlockDim, ITERATOR lastBlockDim, bool appendOneDimension)
 

Protected Attributes

Matrix matrix_
 The full matrix.
 
FastVector< DenseIndexvariableColOffsets_
 the starting columns of each block (0-based)
 
DenseIndex rowStart_
 Changes apparent matrix view, see main class comment.
 
DenseIndex rowEnd_
 Changes apparent matrix view, see main class comment.
 
DenseIndex blockStart_
 Changes apparent matrix view, see main class comment.
 

Friends

class SymmetricBlockMatrix
 
class boost::serialization::access
 Serialization function.
 

Constructor & Destructor Documentation

◆ VerticalBlockMatrix() [1/3]

template<typename CONTAINER >
gtsam::VerticalBlockMatrix::VerticalBlockMatrix ( const CONTAINER &  dimensions,
DenseIndex  height,
bool  appendOneDimension = false 
)
inline

Construct from a container of the sizes of each vertical block.

◆ VerticalBlockMatrix() [2/3]

template<typename CONTAINER , typename DERIVED >
gtsam::VerticalBlockMatrix::VerticalBlockMatrix ( const CONTAINER &  dimensions,
const Eigen::MatrixBase< DERIVED > &  matrix,
bool  appendOneDimension = false 
)
inline

Construct from a container of the sizes of each vertical block and a pre-prepared matrix.

◆ VerticalBlockMatrix() [3/3]

template<typename ITERATOR >
gtsam::VerticalBlockMatrix::VerticalBlockMatrix ( ITERATOR  firstBlockDim,
ITERATOR  lastBlockDim,
DenseIndex  height,
bool  appendOneDimension = false 
)
inline

Construct from iterator over the sizes of each vertical block.

Member Function Documentation

◆ LikeActiveViewOf() [1/2]

VerticalBlockMatrix gtsam::VerticalBlockMatrix::LikeActiveViewOf ( const VerticalBlockMatrix rhs)
static

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.

◆ LikeActiveViewOf() [2/2]

VerticalBlockMatrix gtsam::VerticalBlockMatrix::LikeActiveViewOf ( const SymmetricBlockMatrix rhs,
DenseIndex  height 
)
static

Copy the block structure, but do not copy the matrix data.

If blockStart() has been modified, this copies the structure of the corresponding matrix view. In the destination VerticalBlockMatrix, blockStart() will be 0.

◆ rowEnd() [1/2]

const DenseIndex& gtsam::VerticalBlockMatrix::rowEnd ( ) const
inline

Get the apparent last row (exclusive, i.e.

rows() == rowEnd() - rowStart()) of the underlying matrix for all operations

◆ rowEnd() [2/2]

DenseIndex& gtsam::VerticalBlockMatrix::rowEnd ( )
inline

Get or set the apparent last row (exclusive, i.e.

rows() == rowEnd() - rowStart()) of the underlying matrix for all operations


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