Dense Matrix<T, TSlice, TStorage2D>.Get Diagonal Method
Definition
Namespace: Numerics.NET.LinearAlgebra
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.8.0
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.8.0
Overload List
| Get | Gets a vector view of the diagonal elements of this instance. |
| Get | Gets a vector view of the specified diagonal of this instance. |
| Get | Gets a vector view of the specified diagonal of this instance. |
GetDiagonal(Int32, Intent)
Gets a vector view of the specified diagonal
of this instance.
public override Vector<T> GetDiagonal(
int index,
Intent intent
)Parameters
- index Int32
- The index of the diagonal. A value of zero indicates the main diagonal. A value greater than zero indicates a super-diagonal. A value less than zero indicates a sub-diagonal.
- intent Intent
- An Intent value that specifies the intended use of the diagonal vector.
Return Value
Vector<T>A DenseVector<T> view of the specified diagonal of this matrix.
Remarks
View intents return a dense vector backed by this matrix. Copy intents return detached dense storage. Inherit follows this matrix's mutability and live-sharing state.
The return value is of type DenseVector<T>.
Exceptions
| Argument | index is nonzero and less than or equal to - RowCount, or greater than or equal to ColumnCount. |