LinearAlgebraPool<T>.RentSymmetricMatrix Method

Rents a symmetric matrix with the specified dimensions from the pool.

Definition

Namespace: Numerics.NET.Collections
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.7
C#
public SymmetricMatrix<T> RentSymmetricMatrix(
	int dimension,
	MatrixTriangle storedTriangle = MatrixTriangle.Upper,
	MatrixElementOrder elementOrder = MatrixElementOrder.ColumnMajor
)

Parameters

dimension  Int32
The number of rows and columns in the new symmetric matrix.
storedTriangle  MatrixTriangle  (Optional)
Optional. A MatrixTriangle value that specifies whether to take the elements from the upper or lower triangle of the element values. The default is the upper triangle.
elementOrder  MatrixElementOrder  (Optional)
Optional. A MatrixElementOrder value that indicates whether the elements are stored in column-major or row-major order. The default is column-major order.

Return Value

SymmetricMatrix<T>
A dense Matrix<T> of the specified dimensions.

Remarks

This method rents the storage array from the ArrayPool. It then allocates a new SymmetricMatrix<T> instance with the rented array as its storage.

Exceptions

ArgumentOutOfRangeException

dimension is less than or equal to zero.

See Also