Gets a Vector view of the diagonal elements
of this instance.
Namespace: Extreme.Mathematics.LinearAlgebra
Assembly: Extreme.Numerics (Extreme.Numerics)
Syntax
| Visual Basic (Declaration) |
|---|
Public Overrides Function GetDiagonal ( _ index As Integer _ ) As Vector |
| C# |
|---|
public override Vector GetDiagonal ( int index ) |
| C++ |
|---|
public: virtual Vector^ GetDiagonal ( int index ) override |
Parameters
- index (System.Int32)
- The index of the diagonal. A value of zero indicates the main diagonal. A value greater than zero indicates a superdiagonal. A value less than zero indicates a subdiagonal.
Return Value
A Vector view of the diagonal of this Matrix.
Remarks
This property returns a vector view of the
diagonal. Changing the elements of this Vector
will also change the corresponding elements of the
underlying BandMatrix. If you want
the result to be independent of the underlying matrix,
use the CloneData() method on the
result.
If the diagonal contains only zeroes, then a ConstantVector is returned. Otherwise, a GeneralVector is returned.