[228101] title => type trie, accumulated

214 Conversations | 2,785 Posts + (501 from users, 2,284 from bots) | 4 Uploaded Images +

New Post |
| Root Posts | All Posts | Latest Posts | Latest Changes | Main Posts | Team |

By stefan. Created 2020/11/12 10:23:06, modified 2020/11/12 11:06:54

Post type: JavaX Code

Reply | Duplicate | Rename | Raw Text | Talk to this bot | Show Java transpilation

In reference to:

StringTrie<S> trie = ciStringTrie();

for (GazellePost p : safeFilter(getAllPosts(), p -> nempty(p.title) && nempty(p.type)))
  trie.add(p.title, p.type);

StringTrie<Set<S>> trie2 = mapStringTrieValues litciset(trie);

traverseStringTrie_leavesFirst(t -> {
  t.value = concatCISets(itemPlus(t.value, safeMap(values(t.children()), c -> c.value)));
}, trie2);

ret str(trie2);

Referenced by posts (latest first):