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

#include <tpl_splay_tree.H>

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

Public Types

using Base = GenTdSplayTree< BinNodeVtl, Key, Compare >
 
- Public Types inherited from GenTdSplayTree< NodeType, Key, Compare >
using Node = NodeType< Key >
 
using key_type = Key
 The key type stored in the node.
 

Additional Inherited Members

- Public Member Functions inherited from GenTdSplayTree< NodeType, Key, Compare >
Compare & key_comp () noexcept
 Returns a reference to the comparison criteria.
 
Compare & get_compare () noexcept
 See key_comp().
 
void splay (const Key &key) noexcept
 Search key within the tree and splay that node; if key is not found, the last node of the search is splayed.
 
 GenTdSplayTree () 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.
 
 GenTdSplayTree (Compare __cmp) 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.
 
 GenTdSplayTree (const GenTdSplayTree &)=delete
 Not copyable: the tree does not own its nodes, and a copy would hold the same ones.
 
GenTdSplayTree & operator= (const GenTdSplayTree &)=delete
 Not copyable, for the same reason as the copy constructor.
 
 GenTdSplayTree (GenTdSplayTree &&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.
 
void swap (GenTdSplayTree &tree) noexcept(std::is_nothrow_swappable_v< Compare >)
 Swaps in constant time the nodes and the comparison criteria of this and tree.
 
virtual ~GenTdSplayTree ()=default
 Destructor.
 
Node * insert (Node *p) noexcept
 Inserts a node in a top-down splay tree.
 
Node * insert_dup (Node *p) noexcept
 Inserts a node in a top-down splay tree, even if its key is already in the tree.
 
Node * search (const Key &key) noexcept
 Searches a key in a top-down splay tree.
 
Node * search_or_insert (Node *p) noexcept
 Searches the key of p and, if it is not in the tree, inserts p.
 
Node * remove (const Key &key) noexcept
 Remove a key from a top down splay tree.
 
Node *& getRoot () noexcept
 Get the top-down splay tree's root.
 
bool verify () const
 

Detailed Description

template<typename Key, class Compare = Aleph::less<Key>>
requires StrictWeakOrder<Compare, Key>
struct Splay_Tree_Vtl< Key, Compare >

Definition at line 569 of file tpl_splay_tree.H.

Member Typedef Documentation

◆ Base

template<typename Key , class Compare = Aleph::less<Key>>
using Splay_Tree_Vtl< Key, Compare >::Base = GenTdSplayTree<BinNodeVtl, Key, Compare>

Definition at line 571 of file tpl_splay_tree.H.


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