@@ -18,15 +18,17 @@ UPDATE: I found this example (also from Wikipedia) that shows an interesting edg
1818
1919![ Edge_case] ( https://upload.wikimedia.org/wikipedia/commons/6/63/An_example_of_how_to_find_a_string_in_a_Patricia_trie.png )
2020
21- It shows that __ slow__ can be both a node - and a leaf - at the same time, something which
22- I had not considered. Interestingly, my understanding was that the root node of the trie
23- (trie apparently comes from _ retrieval_ - although I have my doubts about this) was always
24- a single character whereas this diagram shows the root node as the entire word ` slow ` .
21+ It shows that __ slow__ can be both a node - and a leaf - at the same time. This is something
22+ which I had not considered (another example might be __ real__ and __ realistic__ ). Interestingly,
23+ my understanding was that the root node of the trie (it may - or may not - be true that trie
24+ comes from _ retrieval_ ) is always a single character whereas this diagram shows the root node
25+ as the entire word ` slow ` .
2526
2627For retrieval purposes I am inclined to persist with using a single character as a root.
2728The only practical purpose for a trie that I have been able to find is for search bars
2829and the like and being able to respond quickly to that first typed character sounds like
29- what I am after.
30+ what I am after. In the case of __ bytes__ this would make it possible to use the initial
31+ byte as an offset index, although I doubt this would be practical for runes.
3032
3133## Motivation
3234
@@ -113,6 +115,7 @@ than for system testing.
113115## To Do
114116
115117- [ ] Investigate applications of Patricia tries
118+ - [x] Refactor tests to avoid some of the duplicated code
116119- [ ] Find out the idiom for stacking __ Insert__ and __ Find__ tests (avoiding mocks)
117120- [ ] Investigate whether byte-based __ and__ rune-based options are viable
118121- [ ] Find more examples of tries in use - specifically Rune-based CJKV (Chinese, Japanese, Korean, Vietnamese)
0 commit comments