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

Interval tree node with sentinel support. More...

#include <tpl_interval_tree.H>

Inheritance diagram for Aleph::Interval_Tree_Node< Key >:
[legend]
Collaboration diagram for Aleph::Interval_Tree_Node< Key >:
[legend]

Public Types

using Endpoint = interval_endpoint_t< Key >
 
using Data = Interval_Tree_Node_Data< Endpoint >
 
using key_type = Key
 
using Key_Type = Key
 

Public Member Functions

Key & get_key () noexcept
 
const Key & get_key () const noexcept
 
Interval_Tree_Node *& getL () noexcept
 
Interval_Tree_Node *& getR () noexcept
 
const Interval_Tree_NodegetL () const noexcept
 
const Interval_Tree_NodegetR () const noexcept
 
 Interval_Tree_Node (const Key &k)
 
 Interval_Tree_Node (Key &&k) noexcept(std::is_nothrow_move_constructible_v< Key >)
 
 Interval_Tree_Node (const Interval_Tree_Node &node)
 
 Interval_Tree_Node (Interval_Tree_Node &&node) noexcept(std::is_nothrow_move_constructible_v< Key > and std::is_nothrow_move_constructible_v< Data >)
 
 Interval_Tree_Node ()
 
void reset () noexcept
 
- Public Member Functions inherited from Aleph::Interval_Tree_Node_Data< interval_endpoint_t< Key > >
 Interval_Tree_Node_Data () noexcept(std::is_nothrow_default_constructible_v< interval_endpoint_t< Key > >)
 
 Interval_Tree_Node_Data (SentinelCtor) noexcept(std::is_nothrow_default_constructible_v< interval_endpoint_t< Key > >)
 
unsigned long & getPriority () noexcept
 
interval_endpoint_t< Key > & getMaxEndpoint () noexcept
 
const interval_endpoint_t< Key > & getMaxEndpoint () const noexcept
 

Static Public Attributes

static constexpr size_t MaxHeight = 80
 
static Interval_Tree_Node *const NullPtr = &Interval_Tree_Node<Key>::sentinel_node
 

Private Member Functions

 Interval_Tree_Node (SentinelCtor)
 

Private Attributes

Key key = Key()
 
Interval_Tree_NodelLink
 
Interval_Tree_NoderLink
 

Static Private Attributes

static Interval_Tree_Node sentinel_node
 The sentinel node instance.
 

Additional Inherited Members

- Static Public Member Functions inherited from Aleph::Interval_Tree_Node_Data< interval_endpoint_t< Key > >
static void reset () noexcept
 

Detailed Description

template<typename Key>
class Aleph::Interval_Tree_Node< Key >

Interval tree node with sentinel support.

Cannot use DECLARE_BINNODE_SENTINEL because our Control_Data is templated on T (extracted from Key = Interval<T>). We replicate the macro's structure manually.

Template Parameters
Keymust be Interval<T> for some type T.

Definition at line 293 of file tpl_interval_tree.H.

Member Typedef Documentation

◆ Data

Definition at line 298 of file tpl_interval_tree.H.

◆ Endpoint

template<typename Key >
using Aleph::Interval_Tree_Node< Key >::Endpoint = interval_endpoint_t<Key>

Definition at line 297 of file tpl_interval_tree.H.

◆ key_type

template<typename Key >
using Aleph::Interval_Tree_Node< Key >::key_type = Key

Definition at line 303 of file tpl_interval_tree.H.

◆ Key_Type

template<typename Key >
using Aleph::Interval_Tree_Node< Key >::Key_Type = Key

Definition at line 304 of file tpl_interval_tree.H.

Constructor & Destructor Documentation

◆ Interval_Tree_Node() [1/6]

◆ Interval_Tree_Node() [2/6]

◆ Interval_Tree_Node() [3/6]

template<typename Key >
Aleph::Interval_Tree_Node< Key >::Interval_Tree_Node ( const Interval_Tree_Node< Key > &  node)
inline

Definition at line 336 of file tpl_interval_tree.H.

◆ Interval_Tree_Node() [4/6]

template<typename Key >
Aleph::Interval_Tree_Node< Key >::Interval_Tree_Node ( Interval_Tree_Node< Key > &&  node)
inlinenoexcept

Definition at line 343 of file tpl_interval_tree.H.

◆ Interval_Tree_Node() [5/6]

template<typename Key >
Aleph::Interval_Tree_Node< Key >::Interval_Tree_Node ( )
inline

Definition at line 352 of file tpl_interval_tree.H.

◆ Interval_Tree_Node() [6/6]

template<typename Key >
Aleph::Interval_Tree_Node< Key >::Interval_Tree_Node ( SentinelCtor  )
inlineprivate

Definition at line 367 of file tpl_interval_tree.H.

Member Function Documentation

◆ get_key() [1/2]

template<typename Key >
const Key & Aleph::Interval_Tree_Node< Key >::get_key ( ) const
inlinenoexcept

Definition at line 316 of file tpl_interval_tree.H.

References Aleph::Interval_Tree_Node< Key >::key.

◆ get_key() [2/2]

template<typename Key >
Key & Aleph::Interval_Tree_Node< Key >::get_key ( )
inlinenoexcept

Definition at line 315 of file tpl_interval_tree.H.

References Aleph::Interval_Tree_Node< Key >::key.

◆ getL() [1/2]

template<typename Key >
const Interval_Tree_Node * Aleph::Interval_Tree_Node< Key >::getL ( ) const
inlinenoexcept

Definition at line 320 of file tpl_interval_tree.H.

References Aleph::Interval_Tree_Node< Key >::lLink.

◆ getL() [2/2]

template<typename Key >
Interval_Tree_Node *& Aleph::Interval_Tree_Node< Key >::getL ( )
inlinenoexcept

Definition at line 318 of file tpl_interval_tree.H.

References Aleph::Interval_Tree_Node< Key >::lLink.

◆ getR() [1/2]

template<typename Key >
const Interval_Tree_Node * Aleph::Interval_Tree_Node< Key >::getR ( ) const
inlinenoexcept

Definition at line 321 of file tpl_interval_tree.H.

References Aleph::Interval_Tree_Node< Key >::rLink.

◆ getR() [2/2]

template<typename Key >
Interval_Tree_Node *& Aleph::Interval_Tree_Node< Key >::getR ( )
inlinenoexcept

Definition at line 319 of file tpl_interval_tree.H.

References Aleph::Interval_Tree_Node< Key >::rLink.

◆ reset()

Member Data Documentation

◆ key

◆ lLink

◆ MaxHeight

template<typename Key >
constexpr size_t Aleph::Interval_Tree_Node< Key >::MaxHeight = 80
staticconstexpr

Definition at line 300 of file tpl_interval_tree.H.

◆ NullPtr

template<typename Key >
Interval_Tree_Node< Key > *const Aleph::Interval_Tree_Node< Key >::NullPtr = &Interval_Tree_Node<Key>::sentinel_node
static

Definition at line 301 of file tpl_interval_tree.H.

Referenced by Aleph::Interval_Tree_Node< Key >::reset().

◆ rLink

◆ sentinel_node

template<typename Key >
Interval_Tree_Node< Key > Aleph::Interval_Tree_Node< Key >::sentinel_node
staticprivate

The sentinel node instance.

Definition at line 312 of file tpl_interval_tree.H.


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