Trait bitm::Select

source ·
pub trait Select {
    // Required method
    fn try_select(&self, rank: usize) -> Option<usize>;

    // Provided methods
    fn select(&self, rank: usize) -> usize { ... }
    unsafe fn select_unchecked(&self, rank: usize) -> usize { ... }
}
Expand description

Trait implemented by the types that support select (one) queries, i.e. can (quickly) find the position of the n-th one in the bitmap.

Required Methods§

source

fn try_select(&self, rank: usize) -> Option<usize>

Returns the position of the rank-th one (counting from 0) in self or None if there are no such many ones in self.

Provided Methods§

source

fn select(&self, rank: usize) -> usize

Returns the position of the rank-th one (counting from 0) in self or panics if there are no such many ones in self.

source

unsafe fn select_unchecked(&self, rank: usize) -> usize

Returns the position of the rank-th one (counting from 0) in self. The result is undefined if there are no such many ones in self.

Implementors§

source§

impl<S: SelectForRank101111, S0, BV: Deref<Target = [u64]>> Select for RankSelect101111<S, S0, BV>