The current SparseMatrix class is implemented in the sparse COO format. However, with just a rudimentary CSR implementation, a significant performance improvement for sparse-sparse matrix multiplication was observed. As such, the following changes should be made.
Rename the SparseMatrix class to SparseCooMatrix.
Implement a SparseCsrMatrix class which stores matrices int the compressed sparse row (CSR) format.
The mult method for all sparse matrices should return a dense matrix by default.
Add a mult2Sparse method for sparse matrices which computes the sparse-sparse matrix multiplication but stores as a sparse matrix.
The previously existing sparse matrix implementations have been renamed to include Coo in the name to indicate they are stored internally in coordinate format.
Much of the functionality for real sparse CSR matrices has been implemented
Test coverage is poor. More tests need to be written.
The current
SparseMatrix
class is implemented in the sparse COO format. However, with just a rudimentary CSR implementation, a significant performance improvement for sparse-sparse matrix multiplication was observed. As such, the following changes should be made.SparseMatrix
class toSparseCooMatrix.
SparseCsrMatrix
class which stores matrices int the compressed sparse row (CSR) format.mult
method for all sparse matrices should return a dense matrix by default.mult2Sparse
method for sparse matrices which computes the sparse-sparse matrix multiplication but stores as a sparse matrix.