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 Vector containing the diagonal components if index equals the index of the nonzero diagonal; otherwise a ConstantVector with value zero.

Exceptions

ExceptionCondition
ArgumentOutOfRangeExceptionindex is less than or equal to - _rowCount, or greater than or equal to _columnCount.