Trait qwt::RankUnsigned

source ·
pub trait RankUnsigned: AccessUnsigned {
    // Required methods
    fn rank(&self, symbol: Self::Item, i: usize) -> Option<usize>;
    unsafe fn rank_unchecked(&self, symbol: Self::Item, i: usize) -> usize;
}
Expand description

A trait for the support of rank query over an Unsigned alphabet.

Required Methods§

source

fn rank(&self, symbol: Self::Item, i: usize) -> Option<usize>

Returns the number of occurrences in the indexed sequence of symbol up to position i excluded.

source

unsafe fn rank_unchecked(&self, symbol: Self::Item, i: usize) -> usize

Returns the number of occurrences in the indexed sequence of symbol up to position i excluded. The function does not check boundaries.

§Safety

Calling this method with an out-of-bounds index is undefined behavior.

Implementors§

source§

impl<T, RS, const WITH_PREFETCH_SUPPORT: bool> RankUnsigned for QWaveletTree<T, RS, WITH_PREFETCH_SUPPORT>
where T: WTIndexable, u8: AsPrimitive<T>, RS: RSforWT,