| NMathFunctionsToSparseMatrix(DoubleMatrix, Int32) Method |
Create a Sparse matrix in compressed row (CSR) format from a dense matrix.
Namespace: CenterSpace.NMath.CoreAssembly: NMath (in NMath.dll) Version: 7.4
Syntax public static DoubleCsrSparseMatrix ToSparseMatrix(
DoubleMatrix A,
int maximumNumberNonzero
)
Public Shared Function ToSparseMatrix (
A As DoubleMatrix,
maximumNumberNonzero As Integer
) As DoubleCsrSparseMatrix
public:
static DoubleCsrSparseMatrix^ ToSparseMatrix(
DoubleMatrix^ A,
int maximumNumberNonzero
)
static member ToSparseMatrix :
A : DoubleMatrix *
maximumNumberNonzero : int -> DoubleCsrSparseMatrix
Parameters
- A DoubleMatrix
- A matrix.
- maximumNumberNonzero Int32
- The maximum number of nonzero elements to
include in the output sparse matrix.
Return Value
DoubleCsrSparseMatrixA sparse matrix in CSR format containing at most
Exceptions Exception | Condition |
---|
NMathException | Thrown if the routine is interrupted processing
because there is no space in the CSR arrays according to the value on
maximumNumberNonzero. |
See Also