Matrix<T>.Get Columns Method
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.2
Overload List
Get | Returns a new matrix that contains only the columns in the specified sequence. |
Get | Returns a matrix that contains only the specified columns of the current matrix. |
Get | Returns a new matrix that contains only the columns in the specified sequence. |
GetColumns(IEnumerable<Int32>)
Returns a new matrix that contains only the columns
in the specified sequence.
public Matrix<T> GetColumns(
IEnumerable<int> indexes
)
Parameters
- indexes IEnumerable<Int32>
- A sequence of indexes of the columns to return.
Return Value
Matrix<T>A new matrix containing only the columns at the positions in indexes.
Exceptions
Argument | indexes is null. |
Argument | At least one of the values in indexes is not a valid column index. |
GetColumns<C>(IEnumerable<C>)
Returns a new matrix that contains only the columns
in the specified sequence.
public Matrix<T> GetColumns<C>(
IEnumerable<C> keys
)
Parameters
- keys IEnumerable<C>
- A sequence of keys of the columns to return.
Type Parameters
- C
Return Value
Matrix<T>A new matrix containing only the columns whose key is in keys.
Exceptions
Argument | keys is null. |
Invalid | The matrix does not have a column index. |
Invalid | The element type of the column index is not C. |
GetColumns(Int32, Int32)
Returns a matrix that contains only the specified columns
of the current matrix.
public Matrix<T> GetColumns(
int startColumn,
int endColumn
)
Parameters
- startColumn Int32
- The zero-based index of the first column to return.
- endColumn Int32
- The zero-based index of the last column to return.
Return Value
Matrix<T>A matrix containing column startColumn to endColumn of this matrix.
Exceptions
Argument | startColumn or endColumn is less than zero or greater than the number of columns of the matrix. |