35#include <visp3/core/vpDebug.h>
36#include <visp3/core/vpException.h>
37#include <visp3/core/vpMatrixException.h>
38#include <visp3/core/vpSubMatrix.h>
52 const unsigned int &nrows,
const unsigned int &ncols)
55 init(m, row_offset, col_offset, nrows, ncols);
67 const unsigned int &nrows,
const unsigned int &ncols)
74 if (((row_offset + nrows) <= m.
getRows()) && ((col_offset + ncols) <= m.
getCols())) {
86 rowPtrs = (
double **)malloc(nrows *
sizeof(
double *));
87 for (
unsigned int r = 0; r < nrows; ++r) {
107 "vpSubMatrix parent vpMatrix has been destroyed"));
111 "vpSubMatrix size of parent vpMatrix has been changed"));
124 "vpSubMatrix mismatch in operator vpSubMatrix=vpMatrix"));
127 for (
unsigned int i = 0; i <
rowNum; ++i) {
128 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];
169 for (
unsigned int i = 0; i <
rowNum; ++i) {
170 for (
unsigned int j = 0; j <
colNum; ++j) {
unsigned int getCols() const
Type * data
Address of the first element of the data array.
unsigned int getRows() const
error that can be emitted by the vpMatrix class and its derivatives
@ incorrectMatrixSizeError
Incorrect matrix size.
@ subMatrixError
Sub operation matrix error.
VP_DEPRECATED void init()
virtual ~vpSubMatrix() VP_OVERRIDE
Destructor.
void checkParentStatus() const
Check is parent vpRowVector has changed since initialization.
vpSubMatrix()
Default constructor.
vpSubMatrix & operator=(const vpSubMatrix &B)
Operation such as subA = subB.