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

slu.matrix.createSparseCOO

Create a sparse matrix in Coordinate (COO) format.

Syntax

slu.matrix.createSparseCOO(m, n, rows, cols, values, dtype?)

Description

Create a sparse matrix in Coordinate (COO) format. COO format (also called triplet format) stores each nonzero as a (row, column, value) triplet. This format is convenient for constructing matrices incrementally but less efficient for arithmetic.

Parameters

NameDescription
m- Number of rows
n- Number of columns
rows- Row indices for each nonzero
cols- Column indices for each nonzero
values- Nonzero values
dtype(optional)- Data type (default: 'float64')

Returns

SparseMatrixCOO