Matrix.CopyFromSymmetric<T> Method

Creates a new SymmetricMatrix<T> by copying data from a one-dimensional array.

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.0.0
C#
public static SymmetricMatrix<T> CopyFromSymmetric<T>(
	T[] source,
	int dimension,
	MatrixTriangle storedTriangle = MatrixTriangle.Upper,
	MatrixElementOrder elementOrder = MatrixElementOrder.ColumnMajor,
	ArrayMutability mutability = ArrayMutability.MutableValues
)

Parameters

source  T[]
A one-dimensional array containing the packed symmetric matrix values.
dimension  Int32
The number of rows and columns in the symmetric matrix.
storedTriangle  MatrixTriangle  (Optional)
Specifies whether the upper or lower triangle is stored in source.
elementOrder  MatrixElementOrder  (Optional)
A MatrixElementOrder value that indicates whether the elements in source are stored in column-major or row-major order.
mutability  ArrayMutability  (Optional)
Specifies how the matrix's values may be changed. The default is mutable values.

Type Parameters

T
The element type of the matrix.

Return Value

SymmetricMatrix<T>
A new SymmetricMatrix<T> with copied data.

Exceptions

ArgumentNullExceptionsource is null.
ArgumentException The length of source is less than dimension * dimension.

See Also