|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Red-black tree with rank support (select/position operations). More...
#include <tpl_rbRk.H>
Classes | |
| class | Iterator |
| Iterator on nodes of the tree. More... | |
Public Types | |
| typedef NodeType< Key > | Node |
| typedef Key | key_type |
Private Member Functions | |
| Node * | search_and_stack_rb (const Key &key, signed char &cmp_result) noexcept |
| Search for key and stack ancestors (optimistic duplicate detection) | |
| Node * | search_dup_and_stack_rb (const Key &key, signed char &cmp_result) |
| Node * | rotate_to_right_rk (Node *p, Node *pp) noexcept |
| Node * | rotate_to_left_rk (Node *p, Node *pp) noexcept |
| void | fix_red_condition (Node *p) |
| void | find_succ_and_swap (Node *p, Node *&pp) |
| void | fix_black_condition (Node *p) |
| void | update_counters_after_insertion () noexcept |
| void | update_counters_after_deletion () noexcept |
| Node * | split_key_rec_rb (Node *p, const Key &key, Node *&t1, Node *&t2) noexcept |
| void | split_key_dup_rec_rb (Node *p, const Key &key, Node *&t1, Node *&t2) noexcept |
| void | split_pos_rec_rb (Node *p, size_t pos, Node *&t1, Node *&t2) noexcept |
Static Private Member Functions | |
| static size_t | black_height (Node *p) noexcept |
| static Node * | rotate_right_simple (Node *p) noexcept |
| static Node * | rotate_left_simple (Node *p) noexcept |
| static void | fix_red_violation (Node *&subtree_root) noexcept |
| static Node * | extract_min_rb (Node *&p) noexcept |
| static Node * | extract_max_rb (Node *&p) noexcept |
| static Node * | join_with_pivot_rb (Node *t1, size_t bh1, Node *pivot, Node *t2, size_t bh2) noexcept |
| static Node * | join_right_rb (Node *t1, size_t bh1, Node *pivot, Node *t2, size_t bh2) noexcept |
| static Node * | join_left_rb (Node *t1, size_t bh1, Node *pivot, Node *t2, size_t bh2) noexcept |
| static Node * | join_exclusive_rec_rb (Node *t1, size_t bh1, Node *t2, size_t bh2) noexcept |
Private Attributes | |
| Node | head_node |
| Node * | head |
| Node *& | root |
| FixedStack< Node * > | rb_stack |
| Compare | cmp |
Static Private Attributes | |
| static constexpr signed char | CmpLess = -1 |
| static constexpr signed char | CmpEqual = 0 |
| static constexpr signed char | CmpGreater = 1 |
Red-black tree with rank support (select/position operations).
This class extends the standard red-black tree with subtree size counts, enabling efficient O(log n) rank-based operations:
count field representing the number of nodes in its subtree (including itself). Rotations update these counts to maintain the invariant. This adds O(1) overhead per rotation but enables O(log n) ranked operations.| NodeType | Node template (RbNodeRk or RbNodeRkVtl). |
| Key | The type of keys stored in the tree. |
| Compare | Comparison functor for ordering keys. |
Definition at line 107 of file tpl_rbRk.H.
| typedef Key Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::key_type |
Definition at line 458 of file tpl_rbRk.H.
| typedef NodeType<Key> Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::Node |
Definition at line 111 of file tpl_rbRk.H.
|
inline |
Definition at line 464 of file tpl_rbRk.H.
|
inlinenoexcept |
Definition at line 475 of file tpl_rbRk.H.
References Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::root.
|
virtualdefault |
|
inlinestaticprivatenoexcept |
Definition at line 679 of file tpl_rbRk.H.
References BLACK, COLOR, h, and Aleph::LLINK().
Referenced by Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::join_exclusive_rec_rb(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::split_key_dup_rec_rb(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::split_key_rec_rb(), and Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::split_pos_rec_rb().
|
inlinestaticprivatenoexcept |
Definition at line 873 of file tpl_rbRk.H.
References BLACK, COLOR, Aleph::COUNT(), Aleph::LLINK(), Aleph::maps(), RED, Aleph::HTList::reset(), and Aleph::RLINK().
Referenced by Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::join_exclusive_rec_rb().
|
inlinestaticprivatenoexcept |
Definition at line 772 of file tpl_rbRk.H.
References BLACK, COLOR, Aleph::COUNT(), Aleph::LLINK(), Aleph::maps(), RED, Aleph::HTList::reset(), and Aleph::RLINK().
Referenced by Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::join_exclusive_rec_rb().
|
inlinenoexcept |
Find the inorder position of a key in the tree.
| [in] | key | to be searched |
Definition at line 666 of file tpl_rbRk.H.
References Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::cmp, Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::find_position(), Aleph::maps(), and Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::root.
Referenced by Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::find_position().
|
inlineprivate |
Definition at line 297 of file tpl_rbRk.H.
References COLOR, Aleph::COUNT(), Aleph::LLINK(), Aleph::maps(), Aleph::FixedStack< T >::push(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::rb_stack, Aleph::RLINK(), and Aleph::FixedStack< T >::top().
Referenced by Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::remove().
|
inlineprivate |
Definition at line 342 of file tpl_rbRk.H.
References BLACK, COLOR, Aleph::LLINK(), Aleph::maps(), Aleph::FixedStack< T >::pop(), Aleph::FixedStack< T >::popn(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::rb_stack, RED, Aleph::RLINK(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::root, Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::rotate_to_left_rk(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::rotate_to_right_rk(), and Aleph::FixedStack< T >::top().
Referenced by Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::remove().
|
inlineprivate |
Definition at line 236 of file tpl_rbRk.H.
References BLACK, COLOR, Aleph::FixedStack< T >::empty(), Aleph::LLINK(), Aleph::maps(), Aleph::FixedStack< T >::pop(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::rb_stack, RED, Aleph::RLINK(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::root, Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::rotate_to_left_rk(), and Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::rotate_to_right_rk().
Referenced by Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::insert(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::insert_dup(), and Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::search_or_insert().
|
inlinestaticprivatenoexcept |
Definition at line 714 of file tpl_rbRk.H.
References BLACK, COLOR, l, Aleph::LLINK(), Aleph::maps(), RED, Aleph::RLINK(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::rotate_left_simple(), and Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::rotate_right_simple().
|
inlinenoexcept |
Definition at line 462 of file tpl_rbRk.H.
References Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::key_comp().
|
inlinenoexcept |
Definition at line 502 of file tpl_rbRk.H.
References Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::root.
Referenced by TEST().
|
inline |
Definition at line 508 of file tpl_rbRk.H.
References Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::CmpEqual, Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::CmpGreater, Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::CmpLess, COLOR, Aleph::FixedStack< T >::empty(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::fix_red_condition(), KEY, Aleph::LLINK(), Aleph::maps(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::rb_stack, RED, Aleph::RLINK(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::root, Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::search_and_stack_rb(), and Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::update_counters_after_insertion().
Referenced by Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::join_exclusive(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().
|
inline |
Definition at line 560 of file tpl_rbRk.H.
References Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::CmpEqual, Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::CmpLess, COLOR, Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::fix_red_condition(), KEY, Aleph::LLINK(), Aleph::maps(), RED, Aleph::RLINK(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::root, Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::search_dup_and_stack_rb(), and Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::update_counters_after_insertion().
|
inlinenoexcept |
|
inlinenoexcept |
Join this tree exclusively with another tree.
All keys in this tree must be less than all keys in t. After the operation, t becomes empty and this tree contains all nodes.
| [in,out] | t | tree to join with (will be empty after) |
Definition at line 1327 of file tpl_rbRk.H.
References Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::insert(), Aleph::FixedStack< T >::is_empty(), Aleph::LLINK(), Aleph::maps(), Aleph::FixedStack< T >::pop(), Aleph::FixedStack< T >::push(), Aleph::RLINK(), and Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::root.
|
inlinestaticprivatenoexcept |
Definition at line 1126 of file tpl_rbRk.H.
References Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::black_height(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::extract_max_rb(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::extract_min_rb(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::join_with_pivot_rb(), and Aleph::maps().
|
inlinestaticprivatenoexcept |
Definition at line 1061 of file tpl_rbRk.H.
References BLACK, COLOR, Aleph::COUNT(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::join_left_rb(), Aleph::LLINK(), Aleph::maps(), RED, Aleph::RLINK(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::rotate_left_simple(), and Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::rotate_right_simple().
Referenced by Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::join_left_rb(), and Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::join_with_pivot_rb().
|
inlinestaticprivatenoexcept |
Definition at line 990 of file tpl_rbRk.H.
References BLACK, COLOR, Aleph::COUNT(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::join_right_rb(), Aleph::LLINK(), Aleph::maps(), RED, Aleph::RLINK(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::rotate_left_simple(), and Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::rotate_right_simple().
Referenced by Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::join_right_rb(), and Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::join_with_pivot_rb().
|
inlinestaticprivatenoexcept |
Definition at line 967 of file tpl_rbRk.H.
References COLOR, Aleph::COUNT(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::join_left_rb(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::join_right_rb(), Aleph::LLINK(), Aleph::maps(), RED, and Aleph::RLINK().
Referenced by Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::join_exclusive_rec_rb(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::split_key_dup_rec_rb(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::split_key_rec_rb(), and Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::split_pos_rec_rb().
|
inlinenoexcept |
Definition at line 460 of file tpl_rbRk.H.
References Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::cmp.
Referenced by Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::get_compare().
|
inlinenoexcept |
Definition at line 483 of file tpl_rbRk.H.
References Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::cmp, and Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::root.
|
inlinenoexcept |
Compute the inorder position of a key.
| [in] | key | to be searched |
Definition at line 651 of file tpl_rbRk.H.
References Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::cmp, Aleph::inorder_position(), Aleph::maps(), and Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::root.
|
inline |
Definition at line 583 of file tpl_rbRk.H.
References BLACK, Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::CmpEqual, COLOR, Aleph::FixedStack< T >::empty(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::find_succ_and_swap(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::fix_black_condition(), Aleph::LLINK(), Aleph::maps(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::rb_stack, Aleph::RLINK(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::root, Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::search_and_stack_rb(), Aleph::FixedStack< T >::top(), and Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::update_counters_after_deletion().
|
inlinestaticprivatenoexcept |
Definition at line 702 of file tpl_rbRk.H.
References Aleph::COUNT(), Aleph::LLINK(), and Aleph::RLINK().
Referenced by Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::fix_red_violation(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::join_left_rb(), and Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::join_right_rb().
|
inlinestaticprivatenoexcept |
Definition at line 692 of file tpl_rbRk.H.
References Aleph::COUNT(), Aleph::LLINK(), and Aleph::RLINK().
Referenced by Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::fix_red_violation(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::join_left_rb(), and Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::join_right_rb().
|
inlineprivatenoexcept |
Definition at line 214 of file tpl_rbRk.H.
References Aleph::COUNT(), Aleph::LLINK(), Aleph::maps(), and Aleph::RLINK().
Referenced by Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::fix_black_condition(), and Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::fix_red_condition().
|
inlineprivatenoexcept |
Definition at line 191 of file tpl_rbRk.H.
References Aleph::COUNT(), Aleph::LLINK(), Aleph::maps(), and Aleph::RLINK().
Referenced by Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::fix_black_condition(), and Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::fix_red_condition().
|
inline |
Definition at line 496 of file tpl_rbRk.H.
References Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::cmp, Aleph::maps(), and Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::root.
Referenced by TEST().
|
inlineprivatenoexcept |
Search for key and stack ancestors (optimistic duplicate detection)
Definition at line 125 of file tpl_rbRk.H.
References Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::cmp, Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::CmpEqual, Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::CmpGreater, Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::CmpLess, Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::head, KEY, Aleph::LLINK(), Aleph::maps(), Aleph::FixedStack< T >::popn(), Aleph::FixedStack< T >::push(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::rb_stack, Aleph::RLINK(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::root, Aleph::FixedStack< T >::size(), and Aleph::FixedStack< T >::top().
Referenced by Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::insert(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::remove(), and Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::search_or_insert().
|
inlineprivate |
Definition at line 164 of file tpl_rbRk.H.
References Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::cmp, Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::CmpEqual, Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::CmpGreater, Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::CmpLess, Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::head, KEY, Aleph::LLINK(), Aleph::maps(), Aleph::FixedStack< T >::push(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::rb_stack, Aleph::RLINK(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::root, and Aleph::FixedStack< T >::top().
Referenced by Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::insert_dup().
|
inline |
Definition at line 534 of file tpl_rbRk.H.
References Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::CmpEqual, Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::CmpGreater, Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::CmpLess, COLOR, Aleph::FixedStack< T >::empty(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::fix_red_condition(), KEY, Aleph::LLINK(), Aleph::maps(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::rb_stack, RED, Aleph::RLINK(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::root, Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::search_and_stack_rb(), and Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::update_counters_after_insertion().
Referenced by TEST().
|
inline |
Return the i-th node in order sense.
| [in] | i | inorder position of node to be selected |
| out_of_range | if i is greater or equal than the number of nodes of tree |
Definition at line 640 of file tpl_rbRk.H.
References Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::root, and Aleph::select().
|
inlinenoexcept |
Definition at line 506 of file tpl_rbRk.H.
References Aleph::COUNT(), and Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::root.
Referenced by Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::split_pos(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().
|
inlinenoexcept |
Split tree by key.
After the operation:
| [in] | key | the splitting key |
| [out] | t1 | tree to receive keys < key |
| [out] | t2 | tree to receive keys > key |
Definition at line 1375 of file tpl_rbRk.H.
References Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::cmp, Aleph::DynList< T >::insert(), Aleph::FixedStack< T >::is_empty(), KEY, Aleph::LLINK(), Aleph::maps(), Aleph::FixedStack< T >::pop(), Aleph::FixedStack< T >::push(), Aleph::RLINK(), and Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::root.
|
inlinenoexcept |
Split tree by key including duplicates.
After the operation:
| [in] | key | the splitting key |
| [out] | t1 | tree to receive keys <= key |
| [out] | t2 | tree to receive keys > key |
Definition at line 1423 of file tpl_rbRk.H.
References Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::cmp, Aleph::DynList< T >::insert(), Aleph::FixedStack< T >::is_empty(), KEY, Aleph::LLINK(), Aleph::maps(), Aleph::FixedStack< T >::pop(), Aleph::FixedStack< T >::push(), Aleph::RLINK(), and Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::root.
Referenced by TEST().
|
inlineprivatenoexcept |
Definition at line 1221 of file tpl_rbRk.H.
References BLACK, Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::black_height(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::cmp, COLOR, Aleph::COUNT(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::join_with_pivot_rb(), KEY, Aleph::LLINK(), Aleph::maps(), RED, Aleph::RLINK(), and Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::split_key_dup_rec_rb().
Referenced by Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::split_key_dup_rec_rb().
|
inlineprivatenoexcept |
Definition at line 1157 of file tpl_rbRk.H.
References BLACK, Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::black_height(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::cmp, COLOR, Aleph::COUNT(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::join_with_pivot_rb(), KEY, Aleph::LLINK(), Aleph::maps(), RED, Aleph::RLINK(), and Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::split_key_rec_rb().
Referenced by Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::split_key_rec_rb().
|
inlinenoexcept |
Split tree by inorder position.
After the operation:
| [in] | pos | the splitting position (0-based) |
| [out] | t1 | tree to receive positions [0, pos) |
| [out] | t2 | tree to receive positions [pos, size) |
Definition at line 1465 of file tpl_rbRk.H.
References Aleph::count(), Aleph::DynList< T >::insert(), Aleph::FixedStack< T >::is_empty(), Aleph::LLINK(), Aleph::maps(), Aleph::FixedStack< T >::pop(), Aleph::FixedStack< T >::push(), Aleph::RLINK(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::root, and Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::size().
|
inlineprivatenoexcept |
Definition at line 1269 of file tpl_rbRk.H.
References BLACK, Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::black_height(), COLOR, Aleph::COUNT(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::join_with_pivot_rb(), Aleph::LLINK(), Aleph::maps(), RED, Aleph::RLINK(), and Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::split_pos_rec_rb().
Referenced by Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::split_pos_rec_rb().
|
inlinenoexcept |
Definition at line 469 of file tpl_rbRk.H.
References Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::cmp, and Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::root.
|
inlineprivatenoexcept |
Definition at line 449 of file tpl_rbRk.H.
References Aleph::COUNT(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::rb_stack, Aleph::FixedStack< T >::size(), and Aleph::FixedStack< T >::top().
Referenced by Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::remove().
|
inlineprivatenoexcept |
Definition at line 439 of file tpl_rbRk.H.
References Aleph::COUNT(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::rb_stack, Aleph::FixedStack< T >::size(), and Aleph::FixedStack< T >::top().
Referenced by Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::insert(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::insert_dup(), and Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::search_or_insert().
|
inline |
Definition at line 581 of file tpl_rbRk.H.
References Aleph::check_rank_tree(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::cmp, Aleph::is_red_black_bst_rk(), Aleph::maps(), and Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::root.
|
private |
Definition at line 119 of file tpl_rbRk.H.
Referenced by Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::find_position(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::key_comp(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::operator=(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::position(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::search(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::search_and_stack_rb(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::search_dup_and_stack_rb(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::split_key(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::split_key_dup(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::split_key_dup_rec_rb(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::split_key_rec_rb(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::swap(), and Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::verify().
|
staticconstexprprivate |
Definition at line 121 of file tpl_rbRk.H.
Referenced by Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::insert(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::insert_dup(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::remove(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::search_and_stack_rb(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::search_dup_and_stack_rb(), and Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::search_or_insert().
|
staticconstexprprivate |
Definition at line 122 of file tpl_rbRk.H.
Referenced by Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::insert(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::search_and_stack_rb(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::search_dup_and_stack_rb(), and Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::search_or_insert().
|
staticconstexprprivate |
Definition at line 120 of file tpl_rbRk.H.
Referenced by Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::insert(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::insert_dup(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::search_and_stack_rb(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::search_dup_and_stack_rb(), and Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::search_or_insert().
|
private |
Definition at line 116 of file tpl_rbRk.H.
Referenced by Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::search_and_stack_rb(), and Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::search_dup_and_stack_rb().
|
private |
Definition at line 115 of file tpl_rbRk.H.
|
private |
Definition at line 118 of file tpl_rbRk.H.
Referenced by Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::find_succ_and_swap(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::fix_black_condition(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::fix_red_condition(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::insert(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::remove(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::search_and_stack_rb(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::search_dup_and_stack_rb(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::search_or_insert(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::update_counters_after_deletion(), and Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::update_counters_after_insertion().
|
private |
Definition at line 117 of file tpl_rbRk.H.
Referenced by Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::Gen_Rb_Tree_Rk(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::find_position(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::fix_black_condition(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::fix_red_condition(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::getRoot(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::insert(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::insert_dup(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::is_empty(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::join_exclusive(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::operator=(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::position(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::remove(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::search(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::search_and_stack_rb(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::search_dup_and_stack_rb(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::search_or_insert(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::select(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::size(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::split_key(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::split_key_dup(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::split_pos(), Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::swap(), and Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare >::verify().