Matrix.CopyFromDiagonal<T> Method

Creates a new DiagonalMatrix<T> with specified diagonal values.

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.1.0
C#
public static DiagonalMatrix<T> CopyFromDiagonal<T>(
	Vector<T> diagonal
)

Parameters

diagonal  Vector<T>
A vector containing the diagonal values.

Type Parameters

T
The element type of the matrix.

Return Value

DiagonalMatrix<T>
A new DiagonalMatrix<T>.

Exceptions

ArgumentNullExceptiondiagonal is null.

See Also