Matrix<T>.Get Submatrix Core Method
Returns a sub-matrix of this matrix.
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
C#
A Matrix<T> that contains the specified rows and columns.
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
protected virtual Matrix<T> GetSubmatrixCore(
Slice rowSlice,
Slice columnSlice,
TransposeOperation transposeOperation,
Intent intent
)
Parameters
- rowSlice Slice
- A Slice structure that specifies the rows to return.
- columnSlice Slice
- A Slice structure that specifies the columns to return.
- transposeOperation TransposeOperation
- A TransposeOperation value that specifies whether or not this view should show the transpose of the matrix.
- intent Intent
- 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
Argument | rowSlice does not define a valid slice of the rows of the matrix. -or- columnSlice does not define a valid slice of the columns of the matrix. |