public interface SparseMatrix extends Matrix, Densifiable, SparseStructure
| Modifier and Type | Interface and Description |
|---|---|
static class |
SparseMatrix.Entry
This is a (non-zero) entry in a sparse matrix.
|
static class |
SparseMatrix.ValueArray |
| Modifier and Type | Method and Description |
|---|---|
List<SparseMatrix.Entry> |
getEntryList()
Exports the non-zero values in the matrix as a list of
SparseMatrix.Entrys. |
SparseMatrix.ValueArray |
getValueArray()
Exports the non-zero values in the matrix as arrays of row/column indices
and values.
|
deepCopy, getColumn, getRow, multiply, scaledget, setadd, minus, multiply, ONE, opposite, t, ZEROtoDensenNonZerosList<SparseMatrix.Entry> getEntryList()
SparseMatrix.Entrys. This is useful
for converting between the different formats of SparseMatrix.Entry. For example,
// construct matrix using DOK DOKSparseMatrix dok = new DOKSparseMatrix(5, 5); // ... insert some values to DOK matrix // convert to CSR matrix for efficient matrix operations CSRSparseMatrix csr = new CSRSparseMatrix(5, 5, dok.getEntryList());
SparseMatrix.ValueArray getValueArray()
SparseMatrix.ValueArrayCopyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.