Implement TrieNode data structure with insertion and longest-prefix lookup #99
Labels
No labels
Blocked
Duplicate
MoSCoW/Could Have
MoSCoW/Must Have
MoSCoW/Should Have
Points/1
Points/13
Points/2
Points/21
Points/3
Points/5
Points/8
Priority/Backlog
Priority/Critical
Priority/High
Priority/Low
Priority/Medium
State/Completed
State/In progress
State/In review
State/Paused
State/Unverified
State/Verified
State/Wont Do
Type/Bug
Type/Epic
Type/Feature
Type/Legendary
Type/Task
Type/Testing
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
#98 Epic: Trie-based Command Dispatch Router
aethyr/Aethyr
Reference: aethyr/Aethyr#99
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Metadata
feat(dispatch): implement TrieNode with insertion and lookupfeature/m1-command-routerBackground and Context
The trie is the core data structure for O(k) command dispatch. Each node represents
a character. Terminal nodes store a
RouteEntry. The trie supports exact match andlongest-prefix match for ambiguity detection.
Expected Behavior
TrieNodestores children as a Hash keyed by characterinsert(key, route_entry)adds a command registrationlookup(key)returns exact match or longest-prefix matchAcceptance Criteria
TrieNodeclass inlib/aethyr/core/commands/trie_node.rbinsertandlookupmethodsSubtasks
Definition of Done
This issue is complete when:
Commit Message in Metadata exactly.
master, reviewed, and merged.Implementation Notes
Design Decisions
TrieOperationsmodule fromTrieNodeclass to satisfy Rubocop ClassLength limit while keeping a clean public APIconflict_entriesremove()promotes highest-priority conflict entry when primary is removedCode Locations
Aethyr::Core::Commands::TrieNode- main trie data structureAethyr::Core::Commands::TrieOperations- extracted private helperslib/aethyr/core/commands/trie_node.rbTest Results