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.Entry s. |
SparseMatrix.ValueArray |
getValueArray()
Exports the non-zero values in the matrix as arrays of row/column indices
and values.
|
deepCopy, getColumn, getRow, multiply, scaled
get, set
add, minus, multiply, ONE, opposite, t, ZERO
toDense
nNonZeros
List<SparseMatrix.Entry> getEntryList()
SparseMatrix.Entry
s. 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.ValueArray
Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.