You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been reading about this classic algorithm, and I was surprised (and happy) to see that one of the few implementations I could find was written in Rust!
Given that this method does particularly well at compressing sparse matrices, I wonder if it would make sense to have a constructor / builder that takes as input a matrix that is already sparse (e.g. represented as CSR, given the row-oriented nature of the algorithm). That way, one could avoid having to take an already sparse representation and densify it before applying this compression.
Thanks!
Rob
The text was updated successfully, but these errors were encountered:
Perhaps the easiest way would be to allow an iterator as an input method (perhaps it could take (r, c, e) where r is the row, c the column, and e the element). If someone wanted to prototype such a thing I think I and @ptersilie would happily review!
This sounds good to me. Though I think I should also mention that this implementation is not as optimal as it could be. If I remember correctly, we only shift in one direction (to the right) when creating the sparse vector. This could be made more optimal by allowing shifts to the left as well, which I think would allow for smaller vectors.
I've been reading about this classic algorithm, and I was surprised (and happy) to see that one of the few implementations I could find was written in Rust!
Given that this method does particularly well at compressing sparse matrices, I wonder if it would make sense to have a constructor / builder that takes as input a matrix that is already sparse (e.g. represented as CSR, given the row-oriented nature of the algorithm). That way, one could avoid having to take an already sparse representation and densify it before applying this compression.
Thanks!
Rob
The text was updated successfully, but these errors were encountered: