|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Red-black tree with nodes without virtual destructor. More...
#include <tpl_rb_tree.H>
Public Types | |
| using | Base = Gen_Rb_Tree< RbNode, Key, Compare > |
Public Types inherited from Aleph::Gen_Rb_Tree< NodeType, Key, Compare > | |
| using | Node = NodeType< Key > |
| using | key_type = Key |
| using | compare_type = Compare |
Additional Inherited Members | |
Public Member Functions inherited from Aleph::Gen_Rb_Tree< NodeType, Key, Compare > | |
| Compare & | key_comp () noexcept |
| Returns a reference to the comparison criteria. | |
| const Compare & | key_comp () const noexcept |
| Compare & | get_compare () noexcept |
| const Compare & | get_compare () const noexcept |
| Gen_Rb_Tree (Compare __cmp=Compare()) noexcept | |
| Default constructor with optional comparator. | |
| void | swap (Gen_Rb_Tree &tree) noexcept |
| Swaps all elements with another tree in constant time. | |
| Gen_Rb_Tree (Gen_Rb_Tree &&tree) noexcept | |
| Move constructor. | |
| Gen_Rb_Tree & | operator= (Gen_Rb_Tree &&tree) noexcept |
| Move assignment operator. | |
| virtual | ~Gen_Rb_Tree ()=default |
| Destructor. | |
| Node * | search (const Key &key) const noexcept |
| Search for a key in the tree. | |
| Node *& | getRoot () noexcept |
| Get reference to root pointer. | |
| Node * | getRoot () const noexcept |
| Get const root pointer. | |
| bool | is_empty () const noexcept |
| Returns true if the tree is empty. | |
| size_t | size () const noexcept |
| Returns the number of nodes in the tree (O(1)) | |
| void | reset () noexcept |
| Reset tree to empty state (does not free nodes) | |
| Node * | insert (Node *p) noexcept |
| Insert a node into the tree. | |
| Node * | search_or_insert (Node *p) noexcept |
| Search for key or insert if not found. | |
| Node * | insert_dup (Node *p) noexcept |
| Insert a node allowing duplicates. | |
| bool | verify () const noexcept |
| Verify that tree satisfies red-black properties. | |
| Node * | remove (const Key &key) noexcept |
| Remove the node containing key. | |
Red-black tree with nodes without virtual destructor.
| Key | Key type stored in tree nodes. |
| Compare | Comparison functor between keys. |
Definition at line 682 of file tpl_rb_tree.H.
| using Aleph::Rb_Tree< Key, Compare >::Base = Gen_Rb_Tree<RbNode, Key, Compare> |
Definition at line 684 of file tpl_rb_tree.H.