Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::interval_tree_detail::Pending_Max< T, bool > Class Template Reference

What the maximum endpoint of a node is to become. More...

Public Member Functions

void set (const T &max) noexcept
 Take note of the new maximum.
 
void give (T &max) const noexcept
 Give the node its new maximum, if it has one.
 

Private Attributes

const T * from = nullptr
 Where the new maximum is, if there is one.
 

Detailed Description

template<typename T, bool = std::is_nothrow_copy_assignable_v<T>>
class Aleph::interval_tree_detail::Pending_Max< T, bool >

What the maximum endpoint of a node is to become.

An insertion or a removal first makes every comparison, with the tree as it was, and takes note of the new maximum of each node whose maximum changes; only then it gives them. This one is for an endpoint whose copy assignment does not throw: it keeps where the new maximum is, an endpoint of the tree that the operation does not change.

Template Parameters
Tthe type of the endpoints.

Definition at line 517 of file tpl_interval_tree.H.

Member Function Documentation

◆ give()

template<typename T , bool = std::is_nothrow_copy_assignable_v<T>>
void Aleph::interval_tree_detail::Pending_Max< T, bool >::give ( T &  max) const
inlinenoexcept

Give the node its new maximum, if it has one.

Parameters
[out]maxthe maximum of the node.

Definition at line 531 of file tpl_interval_tree.H.

References Aleph::interval_tree_detail::Pending_Max< T, bool >::from, and max().

Referenced by Aleph::Gen_Interval_Tree< NodeType, T, Compare >::place().

◆ set()

template<typename T , bool = std::is_nothrow_copy_assignable_v<T>>
void Aleph::interval_tree_detail::Pending_Max< T, bool >::set ( const T &  max)
inlinenoexcept

Take note of the new maximum.

Parameters
[in]maxthe new maximum, which stays where it is until give() copies it.

Definition at line 526 of file tpl_interval_tree.H.

References Aleph::interval_tree_detail::Pending_Max< T, bool >::from, and max().

Referenced by Aleph::Gen_Interval_Tree< NodeType, T, Compare >::join(), Aleph::Gen_Interval_Tree< NodeType, T, Compare >::place(), and Aleph::Gen_Interval_Tree< NodeType, T, Compare >::unlink().

Member Data Documentation

◆ from

template<typename T , bool = std::is_nothrow_copy_assignable_v<T>>
const T* Aleph::interval_tree_detail::Pending_Max< T, bool >::from = nullptr
private

Where the new maximum is, if there is one.

Definition at line 519 of file tpl_interval_tree.H.

Referenced by Aleph::interval_tree_detail::Pending_Max< T, bool >::give(), and Aleph::interval_tree_detail::Pending_Max< T, bool >::set().


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