| trie_create | R Documentation |
Create a trie
trie_create(words = NULL)
words |
vector of character strings with which to initialise trie. Default: NULL |
The trie is implemented here as nested environments. Environments are
created with new.env(parent = emptyenv(), hash = FALSE).
Using the emptyenv() as parent saves some memory, as the parent
environment is never needed in this process.
hash is set to FALSE as using a hash table expands the memory
usage by quite a bit - even if size is set on the hash table.
Using a hash table on the environment doesn't appreciably change the speed of trie creation or preforming look-ups.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.