ADS
Algorithms and Data Structures
Loading...
Searching...
No Matches
ADS::JoinAdaptor Concept Reference

the nodes of a binary search tree as the algorithms based on join see them: nil(), the empty tree; left(), right(), key(), value() and size(), the reading of a node (size() of nil is 0); expose( t , l , r ), which takes off the children of \( t \) into \( l \) and \( r \), so that \( t \) is a node alone; connect( m , l , r ), which hangs \( l \) and \( r \) under the node alone \( m \) and updates what \( m \) keeps of its subtree (its size, its height, its augmented value, the parents of \( l \) and \( r \)); dispose( t ), which frees the subtree \( t \) (nothing for nil); rank( t ), the rank of a tree, and childRank( t , r , c ), that of the child \( c \) of \( t \) of rank \( r \), in \( O( 1 ) \); join( l , rl , m , r , rr ), the join of the balancing scheme, which returns the root and its rank More...

#include <ADS/tree/JoinAlgorithms.h>

Concept definition

template< class A >
concept JoinAdaptor =
requires( typename A::Node * t , typename A::Node *& l ,
const typename A::Key & k , typename A::Rank r )
{
{ A::nil() } -> std::same_as< typename A::Node * >;
{ A::left( t ) } -> std::same_as< typename A::Node * >;
{ A::right( t ) } -> std::same_as< typename A::Node * >;
{ A::key( t ) } -> std::same_as< const typename A::Key & >;
{ A::value( t ) } -> std::same_as< typename A::Value & >;
{ A::size( t ) } -> std::convertible_to< std::size_t >;
A::expose( t , l , l );
{ A::connect( t , t , t ) } -> std::same_as< typename A::Node * >;
A::dispose( t );
{ A::rank( t ) } -> std::same_as< typename A::Rank >;
{ A::childRank( t , r , t ) } -> std::same_as< typename A::Rank >;
{
A::join( t , r , t , t , r )
} -> std::same_as< std::pair< typename A::Node * , typename A::Rank > >;
{ k < k } -> std::convertible_to< bool >;
}
the nodes of a binary search tree as the algorithms based on join see them: nil(),...
Definition JoinAlgorithms.h:216

Detailed description

the nodes of a binary search tree as the algorithms based on join see them: nil(), the empty tree; left(), right(), key(), value() and size(), the reading of a node (size() of nil is 0); expose( t , l , r ), which takes off the children of \( t \) into \( l \) and \( r \), so that \( t \) is a node alone; connect( m , l , r ), which hangs \( l \) and \( r \) under the node alone \( m \) and updates what \( m \) keeps of its subtree (its size, its height, its augmented value, the parents of \( l \) and \( r \)); dispose( t ), which frees the subtree \( t \) (nothing for nil); rank( t ), the rank of a tree, and childRank( t , r , c ), that of the child \( c \) of \( t \) of rank \( r \), in \( O( 1 ) \); join( l , rl , m , r , rr ), the join of the balancing scheme, which returns the root and its rank