tomarrell / rust-elias-fano

Elias-Fano encoding implementation in Rust
MIT License
29 stars 5 forks source link

Is it possible to implement a rank operation? #12

Open GSGerritsen opened 3 years ago

GSGerritsen commented 3 years ago

Hello,

Without iterating through all the values from the start, would it be possible to implement a rank operation that returns the number of values smaller than or equal to some value?

I'm not sure if Elias-Fano makes this kind of operation easy, so alternatively I'm wondering if a next_greater_than_or_equal (as described here) would be much trouble to implement for this crate?