Matrix.CreateIdentity<T> Method

Note: This API is now obsolete.
Returns an identity matrix of the specified dimension.

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.0.0
C#
[ObsoleteAttribute("Use Matrix.Identity<T>(dimension, structure) instead.")]
public static Matrix<T> CreateIdentity<T>(
	int dimension,
	MatrixStructure structure = MatrixStructure.General
)

Parameters

dimension  Int32
An integer greater than 0.
structure  MatrixStructure  (Optional)
Optional. A MatrixStructure value that specifies the structure of the matrix. The default is a full, dense matrix.

Type Parameters

T

Return Value

Matrix<T>
A matrix with dimension rows and columns that has ones on the main diagonal and is zero everywhere else.

See Also