Docs/Sparse Direct Solver (SuperLU)/slu.matrix.createSparseCSR
Back to Sparse Direct Solver (SuperLU)

slu.matrix.createSparseCSR

Create a sparse matrix in Compressed Sparse Row (CSR) format.

Syntax

slu.matrix.createSparseCSR(m, n, colIndices, rowPointers, values, dtype?)

Description

Create a sparse matrix in Compressed Sparse Row (CSR) format. CSR format stores the matrix row by row: - `rowPointers[i]` to `rowPointers[i+1]-1` are indices into values/colIndices for row i - `colIndices[k]` is the column of the k-th nonzero - `values[k]` is the value of the k-th nonzero

Parameters

NameDescription
m- Number of rows
n- Number of columns
colIndices- Column index for each nonzero
rowPointers- Row pointers (length m+1)
values- Nonzero values
dtype(optional)- Data type (default: 'float64')

Returns

SparseMatrixCSR