You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The submap function is extremely useful for retrieving a map for all strings (or suffixes of strings, rather) that contain a specified prefix, and does it very efficiently.
Logically, it is possible to produce a map with all strings with a given prefix removed, and to do this efficiently. The currently provided functions do not seem to allow for this however, and instead require using alterBy or similar to delete every key that has the prefix.
Given that prefixes are such a fundamental part of the logic of tries, I think some more useful prefix operations would be valuable in this library. Consider, for example, the ability to add a common prefix to all keys in the trie, or delete the longest common prefix. Tries make these options inherently efficient, but currently the user does not have the tools to do this efficiently.
The text was updated successfully, but these errors were encountered:
The submap function is extremely useful for retrieving a map for all strings (or suffixes of strings, rather) that contain a specified prefix, and does it very efficiently.
Logically, it is possible to produce a map with all strings with a given prefix removed, and to do this efficiently. The currently provided functions do not seem to allow for this however, and instead require using alterBy or similar to delete every key that has the prefix.
Given that prefixes are such a fundamental part of the logic of tries, I think some more useful prefix operations would be valuable in this library. Consider, for example, the ability to add a common prefix to all keys in the trie, or delete the longest common prefix. Tries make these options inherently efficient, but currently the user does not have the tools to do this efficiently.
The text was updated successfully, but these errors were encountered: