jltsiren / simple-sds

Simple succinct data structures (in Rust)
MIT License
45 stars 7 forks source link

Multiset semantics for SparseVector #9

Closed jltsiren closed 3 years ago

jltsiren commented 3 years ago

SparseVector now supports multisets (sorted integer vectors with duplicate values). They can be built with SparseBuilder::multiset or with SparseVector::try_from_iter. Operations over all bits and set bits work but rank_zero does not. This is similar to the multiset sd_vector in the vgteam fork of SDSL.

Also, because there was some confusion between vector elements and serialization elements, Element trait became Vector and vectors now have items instead of elements.