pub struct Alphabet {
pub symbols: BitSet,
}
Expand description
Representation of an alphabet.
Fields
symbols: BitSet
Implementations
sourceimpl Alphabet
impl Alphabet
sourcepub fn new<C, T>(symbols: T) -> Selfwhere
C: Borrow<u8>,
T: IntoIterator<Item = C>,
pub fn new<C, T>(symbols: T) -> Selfwhere
C: Borrow<u8>,
T: IntoIterator<Item = C>,
Create new alphabet from given symbols.
sourcepub fn is_word<C, T>(&self, text: T) -> boolwhere
C: Borrow<u8>,
T: IntoIterator<Item = C>,
pub fn is_word<C, T>(&self, text: T) -> boolwhere
C: Borrow<u8>,
T: IntoIterator<Item = C>,
Check if given text is a word over the alphabet.
sourcepub fn max_symbol(&self) -> Option<u8>
pub fn max_symbol(&self) -> Option<u8>
Return lexicographically maximal symbol.
Auto Trait Implementations
impl RefUnwindSafe for Alphabet
impl Send for Alphabet
impl Sync for Alphabet
impl Unpin for Alphabet
impl UnwindSafe for Alphabet
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more