Click or drag to resize

NMathFunctionsToSparseMatrix(DoubleMatrix, Int32) Method

Create a Sparse matrix in compressed row (CSR) format from a dense matrix.

Namespace: CenterSpace.NMath.Core
Assembly: NMath (in NMath.dll) Version: 7.4
Syntax
public static DoubleCsrSparseMatrix ToSparseMatrix(
	DoubleMatrix A,
	int maximumNumberNonzero
)

Parameters

A  DoubleMatrix
A matrix.
maximumNumberNonzero  Int32
The maximum number of nonzero elements to include in the output sparse matrix.

Return Value

DoubleCsrSparseMatrix
A sparse matrix in CSR format containing at most
Exceptions
ExceptionCondition
NMathExceptionThrown if the routine is interrupted processing because there is no space in the CSR arrays according to the value on maximumNumberNonzero.
See Also