cisst-saw
Loading...
Searching...
No Matches
ConstSubmatrix Class Reference

#include <vctDynamicConstMatrixBase.h>

Public Types

typedef vctDynamicConstMatrixRef< value_typeType

Detailed Description

Define a ConstSubmatrix class for compatibility with the fixed size matrices. A const submatrix has the same stride as the parent container.

Example:

typedef vctDynamicMatrix<double> MatrixType; MatrixType M(6,6); MatrixType::ConstSubmatrix::Type topLeft(M, 0, 0); MatrixType::ConstSubmatrix::Type bottomRight(M, 3, 3);

Note
There is no straightforward way to define a fixed-size submatrix of a dynamic matrix, because the stride of the dynamic matrix is not known in compilation time. A way to do it is:

vctFixedSizeConstMatrixRef<double, 3, 3, 1, 6> topRight(M, 0, 3); vctFixedSizeConstMatrixRef<double, 3, 3, 1, 6> bottomLeft(M, 3, 0);

Member Typedef Documentation

◆ Type


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