tov / succinct-rs

Succinct Data Structures for Rust
Apache License 2.0
56 stars 15 forks source link

rank and select for IntVector? #16

Closed KonradHoeffner closed 1 year ago

KonradHoeffner commented 1 year ago

I don't see rank and select methods in https://docs.rs/succinct/0.5.2/succinct/struct.IntVector.html. Are those contained in another module or is it not possible to perform rank and select on an IntVector in succinct-rs?

tov commented 1 year ago

An IntVector alone isn't sufficient to do efficient rank/select operations---you need some kind of index.

For rank, see the succint::rank module for two rank support structs, JacobsonRank and Rank9.

If you need select, you can construct a succint::select::BinSearchSelect on top of your rank structure.