Matrix<T>.Get Diagonal Method
Definition
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
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
public Vector<T> GetDiagonal()
Return Value
Vector<T>A vector view of the diagonal of this instance.
Remarks
This property returns a vector view of the diagonal. Changing the elements of this Vector<T> will also change the corresponding elements of the Matrix<T>. If you want the result to be independent of the matrix, use the CloneData() method on the result.
GetDiagonal(Int32)
public Vector<T> GetDiagonal(
int index
)
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.
Return Value
Vector<T>A vector view of the diagonal of this instance.
Remarks
This property returns a vector view of the diagonal. Changing the elements of this Vector<T> will also change the corresponding elements of the Matrix<T>. If you want the result to be independent of the matrix, use the CloneData() method on the result.
Exceptions
Argument | index is less than or equal to -RowCount, or greater than or equal to ColumnCount. |
GetDiagonal(Int32, Intent)
public virtual 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 vector view of the diagonal of this instance.
Remarks
This property returns a vector view of the diagonal. Changing the elements of this Vector<T> will also change the corresponding elements of the Matrix<T>. If you want the result to be independent of the matrix, use the CloneData() method on the result.
Exceptions
Argument | index is less than or equal to -RowCount, or greater than or equal to ColumnCount. |