1 | initial version |
I guess the explanation says it all:
Sparse means that only non-zero elements are stored (though, as a result of operations on a sparse matrix, some of its stored elements can actually become 0. It is up to you to detect such elements and delete them using SparseMat::erase ).
Loop over the sparsematrix and delete the zeros manually before proceeding?