|
Zip and Skip Tries
|
Represents a single node within the SkipTrie structure. More...
#include <SkipTrie.hpp>

Public Member Functions | |
| size_t | lcp (Direction direction) const noexcept |
| Calculates the longest common prefix (LCP) with the neighbor node in the specified direction. | |
| Node * | next_node (Direction direction) const noexcept |
| Retrieves the neighboring node in the specified direction on the same level. | |
Public Attributes | |
| const KEY_T * | key = nullptr |
| Pointer to the key associated with this node. The SkipTrie does not own the key data. | |
| std::shared_ptr< Node > | next {nullptr} |
| Shared pointer to the next node on the same level. | |
| Node * | prev = nullptr |
| Raw pointer to the previous node on the same level. | |
| std::shared_ptr< Node > | down {nullptr} |
| Shared pointer to the corresponding node on the level below. Null for base level nodes. | |
| size_t | lcp_next {0} |
| The Longest Common Prefix (LCP) length between this node's key and the next node's key on the same level. | |
Represents a single node within the SkipTrie structure.
Each node stores a pointer to a key, pointers to its neighbors (next, previous, down), and the Longest Common Prefix (LCP) length with its immediate successor on the same level.
Definition at line 223 of file SkipTrie.hpp.
|
noexcept |
Calculates the longest common prefix (LCP) with the neighbor node in the specified direction.
| direction | The direction (FORWARD or BACKWARD) relative to this node. |
lcp(BACKWARD) for the first node). Definition at line 545 of file SkipTrie.hpp.
|
noexcept |
Retrieves the neighboring node in the specified direction on the same level.
| direction | The direction (FORWARD or BACKWARD) to retrieve the neighbor from. |
nullptr if no neighbor exists in that direction (e.g., next_node(FORWARD) for the tail sentinel). Definition at line 558 of file SkipTrie.hpp.
| std::shared_ptr<Node> SkipTrie< CHAR_T, CHAR_SIZE_BITS >::Node::down {nullptr} |
Shared pointer to the corresponding node on the level below. Null for base level nodes.
Definition at line 232 of file SkipTrie.hpp.
Pointer to the key associated with this node. The SkipTrie does not own the key data.
Definition at line 226 of file SkipTrie.hpp.
| size_t SkipTrie< CHAR_T, CHAR_SIZE_BITS >::Node::lcp_next {0} |
The Longest Common Prefix (LCP) length between this node's key and the next node's key on the same level.
Definition at line 234 of file SkipTrie.hpp.
| std::shared_ptr<Node> SkipTrie< CHAR_T, CHAR_SIZE_BITS >::Node::next {nullptr} |
Shared pointer to the next node on the same level.
Definition at line 228 of file SkipTrie.hpp.
| Node* SkipTrie< CHAR_T, CHAR_SIZE_BITS >::Node::prev = nullptr |
Raw pointer to the previous node on the same level.
Definition at line 230 of file SkipTrie.hpp.