#trie #prefix-tree #retrieval-tree #digital-tree

lr_trie

Left-Right trie is trie capable of mapping any string to any string

11 stable releases

new 1.4.4 Dec 15, 2024
1.4.3 Oct 21, 2024
1.4.2 Aug 18, 2024
1.3.0 Jul 28, 2024

#1142 in Data structures

Download history 15/week @ 2024-09-16 33/week @ 2024-09-23 1/week @ 2024-09-30 1/week @ 2024-10-07 1/week @ 2024-10-14 172/week @ 2024-10-21 4/week @ 2024-11-04 145/week @ 2024-12-09

145 downloads per month

MIT license

39KB
916 lines

Left-Right Trie

Left-Right trie is trie that allows mapping of any string to any string with complexity based on alphabet used size.

let mut trie = LrTrie::new();
let one = KeyEntry::new("emoción").unwrap();
let another = KeyEntry::new("emotion").unwrap();

trie.insert(&one, &another);
assert!(trie.member(&one, LeftRight::Left).is_some());
assert!(trie.member(&another, LeftRight::Left).is_none());

lib.rs:

To reduce memory demands of LrTrie, operations are not particularly optimal. If alphabet used became wide enough, some rework using e.g. hashmap would be needed.

No runtime deps