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

Binary search tree with nodes without virtual destructors,. More...

#include <tpl_binTree.H>

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

Public Types

using Base = GenBinTree< BinNode, Key, Compare >
 
- Public Types inherited from Aleph::GenBinTree< NodeType, Key, Compare >
using Node = NodeType< Key >
 

Additional Inherited Members

- Public Member Functions inherited from Aleph::GenBinTree< NodeType, Key, Compare >
 GenBinTree (const GenBinTree &)=delete
 
GenBinTreeoperator= (const GenBinTree &)=delete
 
void swap (GenBinTree &tree) noexcept
 Swap this with tree in constant time.
 
Compare & key_comp () noexcept
 return the comparison criteria
 
Compare & get_compare () noexcept
 
 GenBinTree (Compare _cmp=Compare()) noexcept
 Initialize an empty tree with comparison criteria __cmp
 
Nodesearch (const Key &key) const noexcept
 Search a key.
 
virtual ~GenBinTree ()=default
 
bool verify () const
 Return true if the tree is a consistent (correct) binary search tree.
 
Node *& getRoot () noexcept
 Return the root of tree.
 
NodegetRoot () const noexcept
 Return the root of tree.
 
bool verifyBin () const
 
Nodeinsert (Node *p) noexcept
 Insert a node in the tree.
 
Nodeinsert_dup (Node *p) noexcept
 Insert a node in the tree.
 
Nodesearch_or_insert (Node *p) noexcept
 Search or insert a key.
 
bool split (const Key &key, GenBinTree &l, GenBinTree &r) noexcept
 Split the tree according to a key.
 
void split_dup (const Key &key, GenBinTree &l, GenBinTree &r) noexcept
 Split the tree according to a key that could be in the tree.
 
Noderemove (const Key &key) noexcept
 Remove a key from the tree.
 
void join (GenBinTree &tree, GenBinTree &dup) noexcept
 Join tree with this.
 
void join_dup (GenBinTree &t) noexcept
 Join this with t independently of the presence of duplicated keys.
 
void join_exclusive (GenBinTree &t) noexcept
 Join exclusive of this with t
 

Detailed Description

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

Binary search tree with nodes without virtual destructors,.

See also
GenBinTree BinTreeVtl DynBinTree

Definition at line 377 of file tpl_binTree.H.

Member Typedef Documentation

◆ Base

template<typename Key , class Compare = Aleph::less<Key>>
using Aleph::BinTree< Key, Compare >::Base = GenBinTree<BinNode, Key, Compare>

Definition at line 379 of file tpl_binTree.H.


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