Back to Sparse Direct Solver (SuperLU)
slu.matrix.sparseToDense
Convert a sparse matrix to a dense array.
Syntax
slu.matrix.sparseToDense(matrix, rowMajor?)
Description
Convert a sparse matrix to a dense array. Warning: This can consume a lot of memory for large matrices. Use only when the matrix is small enough to fit in memory as dense.
Parameters
| Name | Description |
|---|---|
| matrix | - Sparse matrix in any format |
| rowMajor(optional) | - If true, return row-major array (default: false, column-major) |
Returns
DenseMatrix