Gets a Vector view of the specified diagonal
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 GeneralVector view of the specified diagonal of this GeneralMatrix.
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 GeneralMatrix. If you want
the result to be independent of the underlying matrix,
use the CloneData() method on the
result.
The return value is of type GeneralVector.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentOutOfRangeException | index is less than or equal to - _rowCount, or greater than or equal to _columnCount. |