[−][src]Struct ranagrams::trie::Trie
The magical boundary between words and numbers, a Trie
wraps a TrieNode
and various things used for stringification, destringification, and various
caches and denormalizations.
Fields
root: TrieNode
translator: Translator
cache: RwLock<HashMap<Arc<CharCount>, Arc<Vec<(Arc<Vec<usize>>, Arc<CharCount>)>>>>
use_cache: bool
shuffle: bool
Implementations
impl Trie
[src]
pub fn new(
root: TrieNode,
translator: Translator,
use_cache: bool,
shuffle: bool
) -> Trie
[src]
root: TrieNode,
translator: Translator,
use_cache: bool,
shuffle: bool
) -> Trie
pub fn remove(&mut self, word: &[usize])
[src]
Removes the given word from the trie
pub fn words_for(
&self,
cc: Arc<CharCount>,
sort_key: &[usize],
all_words: &bool
) -> Vec<(Arc<Vec<usize>>, Arc<CharCount>)>
[src]
&self,
cc: Arc<CharCount>,
sort_key: &[usize],
all_words: &bool
) -> Vec<(Arc<Vec<usize>>, Arc<CharCount>)>
Produces the words, in their numeric representation, extractable from
a CharCount
along with the residual CharCount
s remaining after their
extraction. More precisely, it is those words sorting at or above the
order of the given sort key. The sort key ensures that only one
permutation of a given anagram is produced.
pub fn optimize(self, cc: CharCount) -> Trie
[src]
pub fn stringify(&self, todo: ToDo) -> String
[src]
Convert a ToDo
from a linked list of words in numeric representation
to a single String
representing an anagram.
Trait Implementations
impl Clone for Trie
[src]
pub fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl RefUnwindSafe for Trie
impl Send for Trie
impl Sync for Trie
impl Unpin for Trie
impl UnwindSafe for Trie
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,