Matrix<T>.GetColumn Method

Definition

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

Overload List

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

GetColumn<C>(C)

Gets the column with the specified column key.
C#
public Vector<T> GetColumn<C>(
	C key
)

Parameters

key  C
The key of the column to be returned.

Type Parameters

C

Return Value

Vector<T>
The column with key key.

Exceptions

InvalidOperationException

The matrix does not have a column index.

InvalidCastException

The element type of the column index is not C.

KeyNotFoundException

key was not found in the column index.

GetColumn(Int32)

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

Parameters

column  Int32
The zero-based index of the column.

Return Value

Vector<T>
A row Vector<T>.

Exceptions

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

GetColumn(Int32, Intent)

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

Parameters

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

Return Value

Vector<T>
A row Vector<T>.

Exceptions

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

GetColumn(Int32, Range)

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

Parameters

column  Int32
The zero-based index of the column.
rowRange  Range
A Range value that specifies the range of elements that are to make up the new vector.

Return Value

Vector<T>
A row Vector<T>.

Exceptions

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

GetColumn(Int32, Int32, Int32)

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

Parameters

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

Return Value

Vector<T>
A row Vector<T>.

Exceptions

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

-or-

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.

GetColumn(Int32, Int32, Int32, Int32)

Returns a column vector for this instance starting at the specified column and row and of the specified length.
C#
public Vector<T> GetColumn(
	int column,
	int startRow,
	int endRow,
	int rowStride
)

Parameters

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

Return Value

Vector<T>
A column Vector<T>.

Exceptions

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

-or-

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.

GetColumn(Int32, Int32, Int32, Int32, Intent)

Returns a column vector for this instance starting at the specified column and row and of the specified length.
C#
public Vector<T> GetColumn(
	int column,
	int startRow,
	int endRow,
	int rowStride,
	Intent intent
)

Parameters

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

Return Value

Vector<T>
A column Vector<T>.

Exceptions

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

-or-

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.

See Also