Closed maboesanman closed 3 years ago
I thought I needed this, but soon realized that I wouldn't be able to because I'm using vectors of floats, which don't implement hash...
The idea was to store my sparse vectors in a hash map because the calculation I am doing is likely to perform redundant calculations, so I look up the vector in a hashmap and skip the calculation if it's already present.
I ended up hashing the indices array because it was easier and a better balance of performance and optimization.
Still, the collections being hashable seems useful, even if it didn't pan out in my case
I see. Thanks for the info. I also think being hashable for types other than floats can be useful.
It would be convenient for the sparse data structures in sprs to implement
Hash
, and deriving it should be fine.This PR also adds
Eq
toCsVecBase
.