Function rank_ones

Source
pub fn rank_ones(index: &[u64], all_bits: BitsRef<'_>, idx: u64) -> Option<u64>
Expand description

Count the set bits before a position in the bits using the index (O(1)).

Returns None it the index is out of bounds.