Matrix<T>.GetSubmatrix(Int32, Int32, Int32, Int32, Int32, Int32, TransposeOperation, Intent) Method

Returns a sub-matrix of this instance.

Definition

Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
public virtual Matrix<T> GetSubmatrix(
	int startRow,
	int endRow,
	int rowStride,
	int startColumn,
	int endColumn,
	int columnStride,
	TransposeOperation transposeOperation,
	Intent intent = Intent.Inherit
)

Parameters

startRow  Int32
Index of the first row of the sub-matrix.
endRow  Int32
Index of the last row of the sub-matrix.
rowStride  Int32
The increment for the row index in the original matrix corresponding to an increment of one in the row index of the new matrix.
startColumn  Int32
Index of the first column of the sub-matrix.
endColumn  Int32
Index of the last column of the sub-matrix.
columnStride  Int32
The increment for the column index in the original matrix corresponding to an increment of one in the column index of the new matrix.
transposeOperation  TransposeOperation
A TransposeOperation value that specifies whether or not this view should show the transpose of the matrix.
intent  Intent  (Optional)
An Intent value that specifies the intended use of the sub-matrix.

Return Value

Matrix<T>
A Matrix<T> that contains the specified rows and columns.

Remarks

The matrix returned by this method is a view on the original matrix. This means that any changes to the elements of the return value will cause the corresponding elements in the original matrix to change as well. Use the CloneData() or the ToDenseMatrix() method on the return value to create a matrix which has its own private element storage independent from the original matrix.

Exceptions

ArgumentOutOfRangeException

startRow is less than zero or greater than or equal to the number of rows.

-or-

endRow or endRow is less than zero or greater than or equal to the number of rows.

-or-

startColumn is less than zero or greater than or equal to the number of columns.

-or-

endColumn or endRow is less than zero or greater than or equal to the number of columns.

See Also