Package org.flag4j.operations.sparse.coo
Class SparseUtils
java.lang.Object
org.flag4j.operations.sparse.coo.SparseUtils
Contains common utility functions for working with sparse matrices.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
SparseUtils
public SparseUtils()
-
-
Method Details
-
createMap
Creates a HashMap where the keys are row indices and the value is a list of all indices in src with that row index.- Parameters:
nnz
- Number of non-zero entries in the sparse matrix.rowIndices
- Row indices of sparse matrix.- Returns:
- A HashMap where the keys are row indices and the value is a list of all indices in
src
with that row index.
-