Matrix<T>.GetRows Method

Definition

Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23

Overload List

GetRows(Subset) Returns a matrix containing only the rows in the specified subset.
GetRows(Int32, Int32) Returns a matrix that contains only the specified rows of the current matrix.
GetRows<R>(IEnumerable<R>) Returns a new matrix that contains only the rows in the specified sequence.

GetRows<R>(IEnumerable<R>)

Returns a new matrix that contains only the rows in the specified sequence.
C#
public Matrix<T> GetRows<R>(
	IEnumerable<R> keys
)

Parameters

keys  IEnumerable<R>
A sequence of keys of the rows to return.

Type Parameters

R

Return Value

Matrix<T>
A new matrix containing only the rows whose key is in keys.

Exceptions

ArgumentNullExceptionkeys is null.
InvalidOperationException

The matrix does not have a row index.

InvalidCastException

The element type of the row index is not R.

GetRows(Subset)

Returns a matrix containing only the rows in the specified subset.
C#
public Matrix<T> GetRows(
	Subset subset
)

Parameters

subset  Subset
A subset that specifies the rows to return.

Return Value

Matrix<T>
A matrix containing only the rows in subset.

GetRows(Int32, Int32)

Returns a matrix that contains only the specified rows of the current matrix.
C#
public Matrix<T> GetRows(
	int startRow,
	int endRow
)

Parameters

startRow  Int32
The zero-based index of the first row to return.
endRow  Int32
The zero-based index of the last row to return.

Return Value

Matrix<T>
A matrix containing row startRow to endRow of this matrix.

Exceptions

ArgumentOutOfRangeException

startRow or endRow is less than zero or greater than the number of rows of the matrix.

See Also