jltsiren / simple-sds

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

select_zero() for SparseVector #11

Closed jltsiren closed 2 years ago

jltsiren commented 2 years ago

Add select_zero() support for SparseVector using binary search with select(), as in SDSL. As a minor optimization, the query switches to a linear scan when there are at most 16 runs of 0s left. Caching the results of the first few iterations of the binary search would be more beneficial, but adding a new support structure would have required changes to the serialization format.

Resolves #10.