Matrix<T>.Get Rows Method
Definition
Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
Overload List
Get | Returns a matrix containing only the rows in the specified subset. |
Get | Returns a matrix that contains only the specified rows of the current matrix. |
Get | 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.
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
Argument | keys is null. |
Invalid | The matrix does not have a row index. |
Invalid | The element type of the row index is not R. |
GetRows(Subset)
Returns a matrix containing only the rows in the specified subset.
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.
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
Argument | startRow or endRow is less than zero or greater than the number of rows of the matrix. |