class CryPrompt::CryPromptTrie
- CryPrompt::CryPromptTrie
- Reference
- Object
Overview
this will serve as the new suggestion tree structure. should be easier to maintain, troubleshoot, and fix it is a modified trie structure. probably not as efficient as using pointers but should be good enough to start with will not accept duplicate words entered
Defined in:
cryprompttrie.crConstructors
Instance Method Summary
-
#<<(node : CryPromptTrie)
add a node to the current nodes child nodes do not add a node unless the node has a word.
-
#[](word : String)
returns the first child node where the node's children
- #child_nodes : Array(CryPromptTrie)
- #child_nodes=(child_nodes : Array(CryPromptTrie))
- #description : String | Nil
- #description=(description : String | Nil)
-
#exists?(word : String | Nil)
checks if a node exists based on the word
-
#nodes : Array(CryPrompt::CryPromptTrie)
returns the child nodes as nodes
-
#nodes_to_string_array
returns an array of strings containint the current nodes children's words
- #word : String | Nil
- #word=(word : String | Nil)
Constructor Detail
Instance Method Detail
add a node to the current nodes child nodes do not add a node unless the node has a word. ie only the root node's word can be nil
returns an array of strings containint the current nodes children's words