|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Top-down red-black tree without virtual destructor. More...
#include <tpl_tdRbTree.H>
Private Types | |
| using | Base = GenTdRbTree< RbNode, Key, Compare > |
Additional Inherited Members | |
Public Types inherited from Aleph::GenTdRbTree< NodeType, Key, Compare > | |
| using | Node = NodeType< Key > |
| using | key_type = Key |
| using | compare_type = Compare |
Public Member Functions inherited from Aleph::GenTdRbTree< NodeType, Key, Compare > | |
| GenTdRbTree () noexcept | |
| Default constructor. | |
| GenTdRbTree (const Compare &__cmp) noexcept | |
| Constructor with comparator. | |
| GenTdRbTree (GenTdRbTree &&other) noexcept | |
| Move constructor. | |
| GenTdRbTree & | operator= (GenTdRbTree &&other) noexcept |
| Move assignment operator. | |
| GenTdRbTree (const GenTdRbTree &)=delete | |
| Deleted copy constructor (use explicit copy if needed) | |
| GenTdRbTree & | operator= (const GenTdRbTree &)=delete |
| Deleted copy assignment. | |
| void | reset () noexcept |
| Reset tree to empty state (does not free nodes) | |
| void | swap (GenTdRbTree &other) noexcept |
| Swap contents with another tree. | |
| virtual | ~GenTdRbTree ()=default |
| size_t | size () const noexcept |
| Get number of nodes in tree (O(1)) | |
| bool | is_empty () const noexcept |
| Check if tree is empty. | |
| Compare & | get_compare () noexcept |
| Get reference to comparator. | |
| const Compare & | get_compare () const noexcept |
| Node * | insert (Node *p) noexcept |
| Insert a node into the tree. | |
| Node * | insert_dup (Node *p) noexcept |
| Insert a node, allowing duplicates. | |
| Node * | search_or_insert (Node *p) noexcept |
| Search for key or insert if not found. | |
| Node * | search (const Key &key) const noexcept |
| Search for a key in the tree. | |
| Node * | remove (const Key &key) noexcept |
| Remove and return node with given key. | |
| Node *& | getRoot () noexcept |
| Get reference to root pointer. | |
| Node * | getRoot () const noexcept |
| Get const root pointer | |
| bool | verifyRedBlack () const noexcept |
| Verify that tree satisfies all red-black properties. | |
| bool | verify () const noexcept |
| Alias for verify. | |
Top-down red-black tree without virtual destructor.
| Key | The type of keys stored in the tree. |
| Compare | Comparison functor (default: std::less<Key>). |
Definition at line 891 of file tpl_tdRbTree.H.
|
private |
Definition at line 893 of file tpl_tdRbTree.H.