LinearAlgebraPool<T>.RentMatrix Method

Rents a dense 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 DenseMatrix<T> RentMatrix(
	int rowCount,
	int columnCount,
	MatrixElementOrder elementOrder = MatrixElementOrder.ColumnMajor
)

Parameters

rowCount  Int32
The number of rows in the matrix.
columnCount  Int32
The number of columns in the matrix.
elementOrder  MatrixElementOrder  (Optional)
Optional. A MatrixElementOrder value that specifies the order in which the matrix elements are stored. The default is column-major order.

Return Value

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

Remarks

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

Exceptions

ArgumentOutOfRangeException

rowCount is less than or equal to zero.

-or-

columnCount is less than or equal to zero.

See Also