Trait qwt::SelectUnsigned

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

A trait for the support of ``selectquery over anUnsigned` alphabet.

Required Methods§

source

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

Returns the position in the indexed sequence of the ith occurrence of symbol. We start counting from 1, so that select(symbol, 1) refers to the first occurrence of symbol. select(symbol, 0) returns None.

source

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

Returns the position in the indexed sequence of the ith occurrence of symbol. We start counting from 1, so that select(symbol, 1) refers to the first occurrence of symbol.

Safety

Calling this method if the ith occurrence of symbol does not exist is undefined behavior.

Implementors§

source§

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