Expand description

The raw functions for building and using rank/select indexes.

The functions here do minimal if any checking on the size or validity of indexes vs. the bitvectors they are used with, so you may run into panics from e.g. out of bounds accesses to slices. They should all be memory-safe though.

Structs

Indicates the index storage was the wrong size for the bit vector it was used with.

Functions

Build the index data for a given bitvector (O(n)).
Check an index is the right size for a given bitvector.
Count the set bits using the index (fast O(1)).
Count the unset bits using the index (fast O(1)).
Calculate the storage size for an index for a given bitvector (O(1)).
Count the set bits before a position in the bits using the index (O(1)).
Count the unset bits before a position in the bits using the index (O(1)).
Find the position of a set bit by its rank using the index (O(log n)).
Find the position of an unset bit by its rank using the index (O(log n)).