Matrix<T>.GetRow Method

Definition

Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
Returns a row or part of a row of this instance.

Overload List

GetRow(Int32) Returns a row vector for this instance that points at the specified row.
GetRow(Int32, Intent) Returns a row vector for this instance that points at the specified row.
GetRow(Int32, Range) Returns a row vector for this instance starting at the specified row and column and of the specified length.
GetRow(Int32, Int32, Int32) Returns a row vector for this instance over the specified range.
GetRow(Int32, Int32, Int32, Intent) Returns a row vector for this instance over the specified range.
GetRow(Int32, Int32, Int32, Int32) Returns a row vector for this instance starting at the specified row and column and of the specified length.
GetRow(Int32, Int32, Int32, Int32, Intent) Returns a row vector for this instance starting at the specified row and column and of the specified length.
GetRow<R>(R) Gets the row with the specified row key.

Matrix<T>.GetRow<R>(R)

Gets the row with the specified row key.
C#
public Vector<T> GetRow<R>(
	R key
)

Parameters

key  R
The key of the row to be returned.

Type Parameters

R

Return Value

Vector<T>
The row with key key.

Exceptions

InvalidOperationException

The matrix does not have a row index.

InvalidCastException

The element type of the row index is not R.

KeyNotFoundException

key was not found in the row index.

Matrix<T>.GetRow(Int32)

Returns a row vector for this instance that points at the specified row.
C#
public Vector<T> GetRow(
	int row
)

Parameters

row  Int32
The zero-based index of the row.

Return Value

Vector<T>
A row Vector<T>.

Exceptions

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

Matrix<T>.GetRow(Int32, Intent)

Returns a row vector for this instance that points at the specified row.
C#
public Vector<T> GetRow(
	int row,
	Intent intent
)

Parameters

row  Int32
The zero-based index of the row.
intent  Intent
An Intent value that specifies the intended use of the row vector.

Return Value

Vector<T>
A row Vector<T>.

Exceptions

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

Matrix<T>.GetRow(Int32, Range)

Returns a row vector for this instance starting at the specified row and column and of the specified length.
C#
public Vector<T> GetRow(
	int row,
	Range columnRange
)

Parameters

row  Int32
The zero-based index of the row.
columnRange  Range
The zero-based index of the column containing the first element in the row vector.

Return Value

Vector<T>
A row Vector<T>.

Exceptions

ArgumentOutOfRangeExceptionrow is less than zero or greater than or equal to the number of rows
- or -
The Range specified by columnRange is outside the bounds of the matrix.

Matrix<T>.GetRow(Int32, Int32, Int32)

Returns a row vector for this instance over the specified range.
C#
public Vector<T> GetRow(
	int row,
	int startColumn,
	int endColumn
)

Parameters

row  Int32
The zero-based index of the row.
startColumn  Int32
The zero-based index of the column containing the first element in the row vector.
endColumn  Int32
The column index of the last element in the row vector.

Return Value

Vector<T>
A row Vector<T>.

Exceptions

ArgumentOutOfRangeExceptionrow 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-

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

Matrix<T>.GetRow(Int32, Int32, Int32, Intent)

Returns a row vector for this instance over the specified range.
C#
public Vector<T> GetRow(
	int row,
	int startColumn,
	int endColumn,
	Intent intent
)

Parameters

row  Int32
The zero-based index of the row.
startColumn  Int32
The zero-based index of the column containing the first element in the row vector.
endColumn  Int32
The column index of the last element in the row vector.
intent  Intent
An Intent value that specifies the intended use of the row vector.

Return Value

Vector<T>
A row Vector<T>.

Exceptions

ArgumentOutOfRangeExceptionrow 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-

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

Matrix<T>.GetRow(Int32, Int32, Int32, Int32)

Returns a row vector for this instance starting at the specified row and column and of the specified length.
C#
public Vector<T> GetRow(
	int row,
	int startColumn,
	int endColumn,
	int columnStride
)

Parameters

row  Int32
The zero-based index of the row.
startColumn  Int32
The zero-based index of the column containing the first element in the row vector.
endColumn  Int32
The column index of the last element in the row vector.
columnStride  Int32
The increment for the index in the row Vector<T> corresponding to an increment of one in the new vector.

Return Value

Vector<T>
A row Vector<T>.

Exceptions

ArgumentOutOfRangeExceptionrow 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-

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

Matrix<T>.GetRow(Int32, Int32, Int32, Int32, Intent)

Returns a row vector for this instance starting at the specified row and column and of the specified length.
C#
public Vector<T> GetRow(
	int row,
	int startColumn,
	int endColumn,
	int columnStride,
	Intent intent
)

Parameters

row  Int32
The zero-based index of the row.
startColumn  Int32
The zero-based index of the column containing the first element in the row vector.
endColumn  Int32
The column index of the last element in the row vector.
columnStride  Int32
The increment for the index in the row Vector<T> corresponding to an increment of one in the new vector.
intent  Intent
An Intent value that specifies the intended use of the row vector.

Return Value

Vector<T>
A row Vector<T>.

Exceptions

ArgumentOutOfRangeExceptionrow 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-

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

See Also