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§
Sourcefn select(&self, symbol: Self::Item, i: usize) -> Option<usize>
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.
Sourceunsafe fn select_unchecked(&self, symbol: Self::Item, i: usize) -> usize
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.