Trait sux::traits::rank_sel::Select

source ·
pub trait Select: BitCount {
    // Required method
    unsafe fn select_unchecked(&self, rank: usize) -> usize;

    // Provided method
    fn select(&self, rank: usize) -> Option<usize> { ... }
}
Expand description

Select over a bit vector.

Required Methods§

source

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

Return the position of the one of given rank.

§Safety

rank must be between zero (included) and the number of ones in the underlying bit vector (excluded).

Provided Methods§

source

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

Return the position of the one of given rank, or None if no such bit exist.

Implementations on Foreign Types§

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

source§

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

Implementors§

source§

impl<B: AsRef<[usize]>> Select for BitVec<B>

source§

impl<B: AsRef<[usize]>> Select for CountBitVec<B>

source§

impl<B: SelectHinted + BitCount, I: AsRef<[u64]>, const LOG2_ONES_PER_INVENTORY: usize, const LOG2_U64_PER_SUBINVENTORY: usize> Select for SelectFixed2<B, I, LOG2_ONES_PER_INVENTORY, LOG2_U64_PER_SUBINVENTORY>

Provide the hint to the underlying structure

source§

impl<B: SelectHinted + BitCount, O: BitFieldSlice<usize>, const LOG2_ONES_PER_INVENTORY: usize> Select for SelectFixed1<B, O, LOG2_ONES_PER_INVENTORY>

Provide the hint to the underlying structure

source§

impl<B: SelectZeroHinted + Select, I: AsRef<[u64]>, const LOG2_ZEROS_PER_INVENTORY: usize, const LOG2_U64_PER_SUBINVENTORY: usize> Select for SelectZeroFixed2<B, I, LOG2_ZEROS_PER_INVENTORY, LOG2_U64_PER_SUBINVENTORY>

Forward Select to the underlying implementation.

source§

impl<B: SelectZeroHinted + Select, O: BitFieldSlice<usize>, const LOG2_ZEROS_PER_INVENTORY: usize> Select for SelectZeroFixed1<B, O, LOG2_ZEROS_PER_INVENTORY>

Forward Select to the underlying implementation.