Matrix<T>.GetDiagonal Method

Gets a vector view of the diagonal elements of this instance.

Definition

Namespace: Extreme.Mathematics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
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.

See Also