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§
sourceunsafe fn select_unchecked(&self, rank: usize) -> usize
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§
Implementations on Foreign Types§
Implementors§
impl<B: AsRef<[usize]>> Select for BitVec<B>
impl<B: AsRef<[usize]>> Select for CountBitVec<B>
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
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
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.
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.