Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::Rb_Tree_Rk_Vtl< Key, Compare > Struct Template Reference

Red-Black binary search tree with virtual destructor in its nodes and with subtree counters for select/position operations. More...

#include <tpl_rbRk.H>

Inheritance diagram for Aleph::Rb_Tree_Rk_Vtl< Key, Compare >:
[legend]
Collaboration diagram for Aleph::Rb_Tree_Rk_Vtl< Key, Compare >:
[legend]

Public Types

using Base = Gen_Rb_Tree_Rk< RbNodeRkVtl, 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 (Compare cmp_arg=Compare())
 
void swap (Gen_Rb_Tree_Rk &tree) noexcept
 
 Gen_Rb_Tree_Rk (Gen_Rb_Tree_Rk &&tree) noexcept
 
Gen_Rb_Tree_Rkoperator= (Gen_Rb_Tree_Rk &&tree) noexcept
 
virtual ~Gen_Rb_Tree_Rk ()=default
 
Nodesearch (const Key &key)
 
Node *& getRoot () noexcept
 
bool is_empty () const noexcept
 
size_t size () const noexcept
 
Nodeinsert (Node *p)
 
Nodesearch_or_insert (Node *p)
 
Nodeinsert_dup (Node *p)
 
bool verify () const
 
Noderemove (const Key &key)
 
Nodeselect (const size_t i) const
 Return the i-th node in order sense.
 
std::pair< long, Node * > position (const Key &key) const noexcept
 Compute the inorder position of a key.
 
std::pair< long, Node * > find_position (const Key &key) const noexcept
 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.
 
Nodesplit_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.
 

Detailed Description

template<typename Key, class Compare = Aleph::less<Key>>
struct Aleph::Rb_Tree_Rk_Vtl< Key, Compare >

Red-Black binary search tree with virtual destructor in its nodes and with subtree counters for select/position operations.

Parameters
Keykey type stored in the tree nodes.
Comparecomparison functor between keys.
See also
Rb_Tree_Rk

Definition at line 1559 of file tpl_rbRk.H.

Member Typedef Documentation

◆ Base

template<typename Key , class Compare = Aleph::less<Key>>
using Aleph::Rb_Tree_Rk_Vtl< Key, Compare >::Base = Gen_Rb_Tree_Rk<RbNodeRkVtl, Key, Compare>

Definition at line 1561 of file tpl_rbRk.H.


The documentation for this struct was generated from the following file: