|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Red-Black binary search tree with nodes without virtual destructor and with subtree counters for select/position operations. More...
#include <tpl_rbRk.H>
Public Types | |
| using | Base = Gen_Rb_Tree_Rk< RbNodeRk, Key, Compare > |
Public Types inherited from Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare > | |
| typedef NodeType< Key > | Node |
| typedef Key | key_type |
Additional Inherited Members | |
Public Member Functions inherited from Aleph::Gen_Rb_Tree_Rk< NodeType, Key, Compare > | |
| Compare & | key_comp () noexcept |
| Compare & | get_compare () noexcept |
| Gen_Rb_Tree_Rk () noexcept(std::is_nothrow_default_constructible_v< Node > and std::is_nothrow_default_constructible_v< Compare > and std::is_nothrow_constructible_v< Compare, Compare & >) | |
| Builds an empty tree with a comparison criteria built by default. | |
| Gen_Rb_Tree_Rk (Compare cmp_arg) noexcept(std::is_nothrow_default_constructible_v< Node > and std::is_nothrow_constructible_v< Compare, Compare & >) | |
Builds an empty tree with the comparison criteria cmp_arg. | |
| void | swap (Gen_Rb_Tree_Rk &tree) noexcept(std::is_nothrow_swappable_v< Compare >) |
Swaps in constant time the nodes and the comparison criteria of this and tree. | |
| Gen_Rb_Tree_Rk (Gen_Rb_Tree_Rk &&tree) noexcept(bin_node_detail::nothrow_header_from_v< Node > and bin_node_detail::nothrow_compare_taken_v< Compare >) | |
Takes the nodes and the comparison criteria of tree, which is left empty and can take nodes again. | |
| Gen_Rb_Tree_Rk & | operator= (Gen_Rb_Tree_Rk &&tree) noexcept(std::is_nothrow_move_assignable_v< Compare >) |
Takes the nodes and the comparison criteria of tree, which is left empty. | |
| virtual | ~Gen_Rb_Tree_Rk ()=default |
| Node * | search (const Key &key) |
| Node *& | getRoot () noexcept |
| bool | is_empty () const noexcept |
| size_t | size () const noexcept |
| Node * | insert (Node *p) |
| Node * | search_or_insert (Node *p) |
| Node * | insert_dup (Node *p) |
| bool | verify () const |
| Node * | remove (const Key &key) |
| Node * | select (const size_t i) const |
| Return the i-th node in order sense. | |
| std::pair< long, Node * > | position (const Key &key) const noexcept(nothrow_compare_copy_v< Compare, Key >) |
| Compute the inorder position of a key. | |
| std::pair< long, Node * > | find_position (const Key &key) const noexcept(nothrow_compare_copy_v< Compare, Key >) |
| Find the inorder position of a key in the tree. | |
| void | join_exclusive (Gen_Rb_Tree_Rk &t) noexcept |
| Join this tree exclusively with another tree. | |
| Node * | split_key (const Key &key, Gen_Rb_Tree_Rk &t1, Gen_Rb_Tree_Rk &t2) noexcept |
| Split tree by key. | |
| void | split_key_dup (const Key &key, Gen_Rb_Tree_Rk &t1, Gen_Rb_Tree_Rk &t2) noexcept |
| Split tree by key including duplicates. | |
| void | split_pos (size_t pos, Gen_Rb_Tree_Rk &t1, Gen_Rb_Tree_Rk &t2) noexcept |
| Split tree by inorder position. | |
Red-Black binary search tree with nodes without virtual destructor and with subtree counters for select/position operations.
| Key | key type stored in the tree nodes. |
| Compare | comparison functor between keys. |
Definition at line 1652 of file tpl_rbRk.H.
| using Aleph::Rb_Tree_Rk< Key, Compare >::Base = Gen_Rb_Tree_Rk<RbNodeRk, Key, Compare> |
Definition at line 1654 of file tpl_rbRk.H.