pub trait SelectHinted {
    // Required methods
    unsafe fn select_hinted_unchecked(
        &self,
        rank: usize,
        hint_pos: usize,
        hint_rank: usize
    ) -> usize;
    fn select_hinted(
        &self,
        rank: usize,
        hint_pos: usize,
        hint_rank: usize
    ) -> Option<usize>;
}
Expand description

Select over a bit vector, with a hint.

This trait is used to implement fast selection by adding to bit vectors indices of different kind. For example, SelectFixed1 adds hints for the positions of ones at fixed intervals.

Required Methods§

source

unsafe fn select_hinted_unchecked( &self, rank: usize, hint_pos: usize, hint_rank: usize ) -> usize

Select the one of given rank, provided the position of a preceding one and its rank.

§Safety

rank must be between zero (included) and the number of ones in the underlying bit vector (excluded). hint_pos must be between 0 (included) and the length of the underlying bit vector (included), and must be the position of a one in the underlying bit vector. hint_rank must be the number of ones in the underlying bit vector before hint_pos, and must be less than or equal to rank.

source

fn select_hinted( &self, rank: usize, hint_pos: usize, hint_rank: usize ) -> Option<usize>

Select the one of given rank, provided the position of a preceding one and its rank.

Implementations on Foreign Types§

source§

impl<T: SelectHinted + ?Sized> SelectHinted for &T

source§

unsafe fn select_hinted_unchecked( &self, rank: usize, hint_pos: usize, hint_rank: usize ) -> usize

source§

fn select_hinted( &self, rank: usize, hint_pos: usize, hint_rank: usize ) -> Option<usize>

source§

impl<T: SelectHinted + ?Sized> SelectHinted for &mut T

source§

unsafe fn select_hinted_unchecked( &self, rank: usize, hint_pos: usize, hint_rank: usize ) -> usize

source§

fn select_hinted( &self, rank: usize, hint_pos: usize, hint_rank: usize ) -> Option<usize>

source§

impl<T: SelectHinted + ?Sized> SelectHinted for Box<T>

source§

unsafe fn select_hinted_unchecked( &self, rank: usize, hint_pos: usize, hint_rank: usize ) -> usize

source§

fn select_hinted( &self, rank: usize, hint_pos: usize, hint_rank: usize ) -> Option<usize>

Implementors§