Struct atlatl::fst::FST
[−]
[src]
pub struct FST<I, O> where
I: Index,
O: Output, { pub da: Dart<I, O>, pub state_output: FnvHashMap<I, O>, }
Hybrid Dart representation for a finite subsequential transducer.
Fields
da: Dart<I, O>
state_output: FnvHashMap<I, O>
Methods
impl<I, O> FST<I, O> where
I: Index,
O: Output,
[src]
I: Index,
O: Output,
fn from_builder(builder: &Builder<I, O>) -> Result<Self>
fn transition(&self, state: I, input: u8) -> Option<State<I>>
Given a starting state and an input, returns the destination state, if any.
fn contains<K>(&self, key: K) -> bool where
K: AsRef<[u8]>,
K: AsRef<[u8]>,
Returns whether the key is present in the FST.
fn get<K>(&self, key: K) -> Option<O> where
K: AsRef<[u8]>,
K: AsRef<[u8]>,
Get the value associated to the key, if any.
fn reap<'a, 'q>(&'a self, query: &'q [u8]) -> Reaper<'a, 'q, I, O>
Returns an iterator producing the values associated to all prefixes of the query, including the empty string and the query itself.
fn reap_past_root<'a, 'q>(
&'a self,
query: &'q [u8]
) -> RootlessReaper<'a, 'q, I, O>
&'a self,
query: &'q [u8]
) -> RootlessReaper<'a, 'q, I, O>
Returns an iterator producing the values associated to all prefixes of the query, including the query itself but excluding the empty string.
fn len(&self) -> usize
The number of nodes in the internal double array, including surplus.
Trait Implementations
impl<I: Clone, O: Clone> Clone for FST<I, O> where
I: Index,
O: Output,
[src]
I: Index,
O: Output,
fn clone(&self) -> FST<I, O>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<I: Debug, O: Debug> Debug for FST<I, O> where
I: Index,
O: Output,
[src]
I: Index,
O: Output,
impl<I: Default, O: Default> Default for FST<I, O> where
I: Index,
O: Output,
[src]
I: Index,
O: Output,
impl<I: Eq, O: Eq> Eq for FST<I, O> where
I: Index,
O: Output,
[src]
I: Index,
O: Output,
impl<I: PartialEq, O: PartialEq> PartialEq for FST<I, O> where
I: Index,
O: Output,
[src]
I: Index,
O: Output,