SelectUnsigned

Trait 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 select query over an Unsigned alphabet.

Required Methods§

Source

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

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

Source

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

Returns the position in the indexed sequence of the i+1th occurrence of symbol. We start counting from 0, so that select(symbol, 0) 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, BRS, const COMPRESSED: bool> SelectUnsigned for WaveletTree<T, BRS, COMPRESSED>

Source§

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

Source§

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