40 #include <visp3/core/vpDebug.h> 41 #include <visp3/core/vpException.h> 42 #include <visp3/core/vpMatrixException.h> 43 #include <visp3/core/vpSubMatrix.h> 56 const unsigned int &nrows,
const unsigned int &ncols)
59 init(m, row_offset, col_offset, nrows, ncols);
71 const unsigned int &nrows,
const unsigned int &ncols)
78 if (row_offset + nrows <= m.
getRows() && col_offset + ncols <= m.
getCols()) {
89 rowPtrs = (
double **)malloc(nrows *
sizeof(
double *));
90 for (
unsigned int r = 0; r < nrows; r++)
108 "vpSubMatrix parent vpMatrix has been destroyed"));
112 "vpSubMatrix size of parent vpMatrix has been changed"));
125 "vpSubMatrix mismatch in operator vpSubMatrix=vpMatrix"));
128 for (
unsigned int i = 0; i <
rowNum; i++) {
129 for (
unsigned int j = 0; j <
colNum; j++)
145 "vpSubMatrix mismatch in operator vpSubMatrix=vpMatrix"));
154 for (
unsigned int i = 0; i <
rowNum; i++) {
155 for (
unsigned int j = 0; j <
colNum; j++)
156 rowPtrs[i][j] = BrowPtrs[i][j];
168 for (
unsigned int i = 0; i <
rowNum; i++) {
169 for (
unsigned int j = 0; j <
colNum; j++)
Implementation of a matrix and operations on matrices.
void checkParentStatus() const
Check is parent vpRowVector has changed since initialization.
Type * data
Address of the first element of the data array.
unsigned int getCols() const
Definition of the vpSubMatrix vpSubMatrix class provides a mask on a vpMatrix all properties of vpMat...
unsigned int rowNum
Number of rows in the array.
virtual ~vpSubMatrix()
Destructor.
vp_deprecated void init()
unsigned int getRows() const
unsigned int colNum
Number of columns in the array.
vpSubMatrix & operator=(const vpSubMatrix &B)
Operation such as subA = subB.
error that can be emited by the vpMatrix class and its derivates
unsigned int dsize
Current array size (rowNum * colNum)
double ** rowPtrs
Address of the first element of each rows.
vpSubMatrix()
Default constructor.