-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Iterate over all common prefixes #30
Comments
do you mean |
|
it's not super elegant, but it seems like this can be implemented efficiently with the |
Could add a function like |
This replaces the `PrefixTree` struct with an `AliasMap` struct. The underlying implementation is different: we no longer build a prefix tree by splitting paths into segments, but instead we have per-character (technically per u8) granularity. I used the [patricia_tree](https://github.com/sile/patricia_tree) crate for the radix tree implementation. My first implementation was based on [qp_trie](https://github.com/sdleffler/qp-trie-rs) but they do not provide a way to iterate over [all common prefixes](sdleffler/qp-trie-rs#30) of a given key and the tree's entries. Fixes #351. Co-authored-by: Tobias Koppers <[email protected]>
Is there a way to iterate over all common prefixes with a particular key?
See https://docs.rs/patricia_tree/latest/patricia_tree/map/struct.PatriciaMap.html#method.common_prefixes
The text was updated successfully, but these errors were encountered: