Submatrix constructors

XXXSubMatrix()

Create an uninitialized matrix.

XXXSubMatrix(int numRows, int numCols)

Create a regular matrix with dimensions numRows by numCols; return a new submatrix with this matrix as its parent. Memory is allocated for the data storage but the entries are uninitialized.

XXXSubMatrix(XXXSubMatrix& src, int sRow, int sCol, int nRows, int nCols)

Create a submatrix and initialize it to reference the region of the parent matrix starting at (sRow, sCol) and of size (nRows, nCols). The parent matrix is the same as the parent matrix of src. The given dimensions must fit into the parent matrix, or an error will be flagged. Unlike the ”submatrix” constructors in the regular matrix classes, this constructor does not copy matrix data.

XXXSubMatrix(const XXXSubMatrix& src)

Make a duplicate of the src submatrix. The parent of the new matrix is the same as the parent of src.