DeSiGNAR  0.5a
Data Structures General Library
Classes | Public Types | Public Member Functions | List of all members
Designar::RankedTreap< Key, Cmp > Class Template Reference

#include <tree.H>

Inheritance diagram for Designar::RankedTreap< Key, Cmp >:
Inheritance graph
[legend]
Collaboration diagram for Designar::RankedTreap< Key, Cmp >:
Collaboration graph
[legend]

Classes

class  InorderIterator
 
class  Iterator
 
class  PostorderIterator
 
class  PreorderIterator
 

Public Types

using Node = TreapRkNode< Key >
 
using ItemType = Key
 
using KeyType = Key
 
using DataType = Key
 
using ValueType = Key
 
using SizeType = nat_t
 
using CmpType = Cmp
 

Public Member Functions

bool verify () const
 
bool verify_dup () const
 
 RankedTreap (rng_seed_t seed, Cmp &_cmp)
 
 RankedTreap (Cmp &_cmp)
 
 RankedTreap (Cmp &&_cmp=Cmp())
 
 RankedTreap (rng_seed_t seed, Cmp &&_cmp=Cmp())
 
 RankedTreap (const RankedTreap &t)
 
 RankedTreap (RankedTreap &&t)
 
 RankedTreap (const std::initializer_list< Key > &)
 
 ~RankedTreap ()
 
RankedTreapoperator= (const RankedTreap &t)
 
RankedTreapoperator= (RankedTreap &&t)
 
void swap (RankedTreap &t)
 
bool is_empty () const
 
bool is_sorted () const
 
nat_t size () const
 
void clear ()
 
Cmp & get_cmp ()
 
const Cmp & get_cmp () const
 
Key * insert (const Key &k)
 
Key * insert (Key &&k)
 
Key * insert_dup (const Key &k)
 
Key * insert_dup (Key &&k)
 
Key * append (const Key &k)
 
Key * append (Key &&k)
 
Key * append_dup (const Key &k)
 
Key * append_dup (Key &&k)
 
Key * search (const Key &k)
 
const Key * search (const Key &k) const
 
Key * search_or_insert (const Key &k)
 
Key * search_or_insert (Key &&k)
 
Key & find (const Key &k)
 
const Key & find (const Key &k) const
 
bool remove (const Key &k)
 
Key remove_pos (nat_t i)
 
const Key & min () const
 
const Key & max () const
 
std::tuple< RankedTreap, RankedTreapsplit_pos (nat_t i)
 
std::tuple< RankedTreap, RankedTreapsplit_key (const Key &k)
 
std::tuple< RankedTreap, RankedTreapsplit_key_dup (const Key &k)
 
void exclusive_join (RankedTreap &ts, RankedTreap &tg)
 
void join_dup (RankedTreap &ts, RankedTreap &tg)
 
Key & select (nat_t i)
 
const Key & select (nat_t i) const
 
lint_t position (const Key &k) const
 
Key & operator[] (nat_t i)
 
const Key & operator[] (nat_t i) const
 
template<class Op >
void for_each_preorder (Op &op)
 
template<class Op >
void for_each_preorder (Op &&op=Op())
 
template<class Op >
void for_each_inorder (Op &op)
 
template<class Op >
void for_each_inorder (Op &&op=Op())
 
template<class Op >
void for_each_postorder (Op &op)
 
template<class Op >
void for_each_postorder (Op &&op=Op())
 
Iterator begin ()
 
Iterator begin () const
 
Iterator end ()
 
Iterator end () const
 
- Public Member Functions inherited from Designar::ContainerAlgorithms< RankedTreap< Key, Cmp >, Key >
Key * nth_ptr (nat_t i)
 
Key & nth (nat_t i)
 
const Key & nth (nat_t i) const
 
void for_each (Op &op) const
 
void for_each (Op &&op=Op()) const
 
ContainerRet filter (Pred &pred) const
 
ContainerRet filter (Pred &&pred=Pred()) const
 
ContainerRet map (Op &op) const
 
ContainerRet map (Op &&op=Op()) const
 
ContainerRet map_if (Op &op, Pred &pred) const
 
ContainerRet map_if (Op &op, Pred &&pred=Pred()) const
 
ContainerRet map_if (Op &&op, Pred &pred) const
 
ContainerRet map_if (Op &&op=Op(), Pred &&pred=Pred()) const
 
RetT fold (const RetT &init_val, Op &op) const
 
RetT fold (const RetT &init_val, Op &&op=Op()) const
 
RetT fold (RetT &&init_val, Op &op) const
 
RetT fold (RetT &&init_val, Op &&op=Op()) const
 
bool all (Pred &pred) const
 
bool all (Pred &&pred=Pred()) const
 
bool exists (Pred &pred) const
 
bool exists (Pred &&pred=Pred()) const
 
bool none (Pred &pred) const
 
bool none (Pred &&pred=Pred()) const
 
Key * search_ptr (Pred &pred) const
 
Key * search_ptr (Pred &&pred=Pred()) const
 
bool remove_first_if (Pred &pred)
 
bool remove_first_if (Pred &&pred=Pred())
 
void remove_if (Pred &pred)
 
void remove_if (Pred &&pred=Pred())
 
bool equal (const ContainerType2 &c, Eq &eq) const
 
bool equal (const ContainerType2 &c, Eq &&eq=Eq()) const
 
bool is_sorted (Cmp &cmp) const
 
bool is_sorted (Cmp &&cmp=Cmp()) const
 
SLList< std::pair< Key, typename ContainerType2::KeyType > > zip (const ContainerType2 &c) const
 
SLList< std::pair< Key, typename ContainerType2::KeyType > > zip_eq (const ContainerType2 &c) const
 
SLList< std::pair< Key, typename ContainerType2::KeyType > > zip_left (const ContainerType2 &c) const
 
SLList< std::pair< Key, typename ContainerType2::KeyType > > zip_right (const ContainerType2 &c) const
 
DynArray< Key > to_array () const
 
SLList< Key > to_list () const
 
- Public Member Functions inherited from Designar::SetAlgorithms< RankedTreap< Key, Cmp >, Key >
bool contains (const Key &k) const
 
bool has (const Key &k) const
 
RankedTreap< Key, Cmp > join (const RankedTreap< Key, Cmp > &s) const
 
RankedTreap< Key, Cmp > intersect (const RankedTreap< Key, Cmp > &s) const
 
RankedTreap< Key, Cmp > difference (const RankedTreap< Key, Cmp > &s) const
 
SLList< std::pair< Key, typename SetType2::KeyType > > cartesian_product (const SetType2 &s) const
 

Additional Inherited Members

- Static Public Member Functions inherited from Designar::SetAlgorithms< RankedTreap< Key, Cmp >, Key >
static RankedTreap< Key, Cmp > join (const RankedTreap< Key, Cmp > &s1, const RankedTreap< Key, Cmp > &s2)
 
static RankedTreap< Key, Cmp > intersect (const RankedTreap< Key, Cmp > &s1, const RankedTreap< Key, Cmp > &s2)
 
static RankedTreap< Key, Cmp > difference (const RankedTreap< Key, Cmp > &s1, const RankedTreap< Key, Cmp > &s2)
 
static SLList< std::pair< Key, typename SetType2::KeyType > > cartesian_product (const RankedTreap< Key, Cmp > &s1, const SetType2 &s2)
 

Member Typedef Documentation

template<typename Key , class Cmp = std::less<Key>>
using Designar::RankedTreap< Key, Cmp >::CmpType = Cmp
template<typename Key , class Cmp = std::less<Key>>
using Designar::RankedTreap< Key, Cmp >::DataType = Key
template<typename Key , class Cmp = std::less<Key>>
using Designar::RankedTreap< Key, Cmp >::ItemType = Key
template<typename Key , class Cmp = std::less<Key>>
using Designar::RankedTreap< Key, Cmp >::KeyType = Key
template<typename Key , class Cmp = std::less<Key>>
using Designar::RankedTreap< Key, Cmp >::Node = TreapRkNode<Key>
template<typename Key , class Cmp = std::less<Key>>
using Designar::RankedTreap< Key, Cmp >::SizeType = nat_t
template<typename Key , class Cmp = std::less<Key>>
using Designar::RankedTreap< Key, Cmp >::ValueType = Key

Constructor & Destructor Documentation

template<typename Key , class Cmp = std::less<Key>>
Designar::RankedTreap< Key, Cmp >::RankedTreap ( rng_seed_t  seed,
Cmp &  _cmp 
)
inline
template<typename Key , class Cmp = std::less<Key>>
Designar::RankedTreap< Key, Cmp >::RankedTreap ( Cmp &  _cmp)
inline
template<typename Key , class Cmp = std::less<Key>>
Designar::RankedTreap< Key, Cmp >::RankedTreap ( Cmp &&  _cmp = Cmp())
inline
template<typename Key , class Cmp = std::less<Key>>
Designar::RankedTreap< Key, Cmp >::RankedTreap ( rng_seed_t  seed,
Cmp &&  _cmp = Cmp() 
)
inline
template<typename Key , class Cmp = std::less<Key>>
Designar::RankedTreap< Key, Cmp >::RankedTreap ( const RankedTreap< Key, Cmp > &  t)
inline
template<typename Key , class Cmp = std::less<Key>>
Designar::RankedTreap< Key, Cmp >::RankedTreap ( RankedTreap< Key, Cmp > &&  t)
inline
template<typename Key , class Cmp >
Designar::RankedTreap< Key, Cmp >::RankedTreap ( const std::initializer_list< Key > &  l)
template<typename Key , class Cmp = std::less<Key>>
Designar::RankedTreap< Key, Cmp >::~RankedTreap ( )
inline

Member Function Documentation

template<typename Key , class Cmp = std::less<Key>>
Key* Designar::RankedTreap< Key, Cmp >::append ( const Key &  k)
inline
template<typename Key , class Cmp = std::less<Key>>
Key* Designar::RankedTreap< Key, Cmp >::append ( Key &&  k)
inline
template<typename Key , class Cmp = std::less<Key>>
Key* Designar::RankedTreap< Key, Cmp >::append_dup ( const Key &  k)
inline
template<typename Key , class Cmp = std::less<Key>>
Key* Designar::RankedTreap< Key, Cmp >::append_dup ( Key &&  k)
inline
template<typename Key , class Cmp = std::less<Key>>
Iterator Designar::RankedTreap< Key, Cmp >::begin ( )
inline
template<typename Key , class Cmp = std::less<Key>>
Iterator Designar::RankedTreap< Key, Cmp >::begin ( ) const
inline
template<typename Key , class Cmp = std::less<Key>>
void Designar::RankedTreap< Key, Cmp >::clear ( )
inline
template<typename Key , class Cmp = std::less<Key>>
Iterator Designar::RankedTreap< Key, Cmp >::end ( )
inline
template<typename Key , class Cmp = std::less<Key>>
Iterator Designar::RankedTreap< Key, Cmp >::end ( ) const
inline
template<typename Key , class Cmp = std::less<Key>>
void Designar::RankedTreap< Key, Cmp >::exclusive_join ( RankedTreap< Key, Cmp > &  ts,
RankedTreap< Key, Cmp > &  tg 
)
inline
template<typename Key , class Cmp = std::less<Key>>
Key& Designar::RankedTreap< Key, Cmp >::find ( const Key &  k)
inline
template<typename Key , class Cmp = std::less<Key>>
const Key& Designar::RankedTreap< Key, Cmp >::find ( const Key &  k) const
inline
template<typename Key , class Cmp = std::less<Key>>
template<class Op >
void Designar::RankedTreap< Key, Cmp >::for_each_inorder ( Op &  op)
inline
template<typename Key , class Cmp = std::less<Key>>
template<class Op >
void Designar::RankedTreap< Key, Cmp >::for_each_inorder ( Op &&  op = Op())
inline
template<typename Key , class Cmp = std::less<Key>>
template<class Op >
void Designar::RankedTreap< Key, Cmp >::for_each_postorder ( Op &  op)
inline
template<typename Key , class Cmp = std::less<Key>>
template<class Op >
void Designar::RankedTreap< Key, Cmp >::for_each_postorder ( Op &&  op = Op())
inline
template<typename Key , class Cmp = std::less<Key>>
template<class Op >
void Designar::RankedTreap< Key, Cmp >::for_each_preorder ( Op &  op)
inline
template<typename Key , class Cmp = std::less<Key>>
template<class Op >
void Designar::RankedTreap< Key, Cmp >::for_each_preorder ( Op &&  op = Op())
inline
template<typename Key , class Cmp = std::less<Key>>
Cmp& Designar::RankedTreap< Key, Cmp >::get_cmp ( )
inline
template<typename Key , class Cmp = std::less<Key>>
const Cmp& Designar::RankedTreap< Key, Cmp >::get_cmp ( ) const
inline
template<typename Key , class Cmp = std::less<Key>>
Key* Designar::RankedTreap< Key, Cmp >::insert ( const Key &  k)
inline
template<typename Key , class Cmp = std::less<Key>>
Key* Designar::RankedTreap< Key, Cmp >::insert ( Key &&  k)
inline
template<typename Key , class Cmp = std::less<Key>>
Key* Designar::RankedTreap< Key, Cmp >::insert_dup ( const Key &  k)
inline
template<typename Key , class Cmp = std::less<Key>>
Key* Designar::RankedTreap< Key, Cmp >::insert_dup ( Key &&  k)
inline
template<typename Key , class Cmp = std::less<Key>>
bool Designar::RankedTreap< Key, Cmp >::is_empty ( ) const
inline
template<typename Key , class Cmp = std::less<Key>>
bool Designar::RankedTreap< Key, Cmp >::is_sorted ( ) const
inline
template<typename Key , class Cmp = std::less<Key>>
void Designar::RankedTreap< Key, Cmp >::join_dup ( RankedTreap< Key, Cmp > &  ts,
RankedTreap< Key, Cmp > &  tg 
)
inline
template<typename Key , class Cmp = std::less<Key>>
const Key& Designar::RankedTreap< Key, Cmp >::max ( ) const
inline
template<typename Key , class Cmp = std::less<Key>>
const Key& Designar::RankedTreap< Key, Cmp >::min ( ) const
inline
template<typename Key , class Cmp = std::less<Key>>
RankedTreap& Designar::RankedTreap< Key, Cmp >::operator= ( const RankedTreap< Key, Cmp > &  t)
inline
template<typename Key , class Cmp = std::less<Key>>
RankedTreap& Designar::RankedTreap< Key, Cmp >::operator= ( RankedTreap< Key, Cmp > &&  t)
inline
template<typename Key , class Cmp = std::less<Key>>
Key& Designar::RankedTreap< Key, Cmp >::operator[] ( nat_t  i)
inline
template<typename Key , class Cmp = std::less<Key>>
const Key& Designar::RankedTreap< Key, Cmp >::operator[] ( nat_t  i) const
inline
template<typename Key , class Cmp = std::less<Key>>
lint_t Designar::RankedTreap< Key, Cmp >::position ( const Key &  k) const
inline
template<typename Key , class Cmp = std::less<Key>>
bool Designar::RankedTreap< Key, Cmp >::remove ( const Key &  k)
inline
template<typename Key , class Cmp = std::less<Key>>
Key Designar::RankedTreap< Key, Cmp >::remove_pos ( nat_t  i)
inline
template<typename Key , class Cmp = std::less<Key>>
Key* Designar::RankedTreap< Key, Cmp >::search ( const Key &  k)
inline
template<typename Key , class Cmp = std::less<Key>>
const Key* Designar::RankedTreap< Key, Cmp >::search ( const Key &  k) const
inline
template<typename Key , class Cmp = std::less<Key>>
Key* Designar::RankedTreap< Key, Cmp >::search_or_insert ( const Key &  k)
inline
template<typename Key , class Cmp = std::less<Key>>
Key* Designar::RankedTreap< Key, Cmp >::search_or_insert ( Key &&  k)
inline
template<typename Key , class Cmp = std::less<Key>>
Key& Designar::RankedTreap< Key, Cmp >::select ( nat_t  i)
inline
template<typename Key , class Cmp = std::less<Key>>
const Key& Designar::RankedTreap< Key, Cmp >::select ( nat_t  i) const
inline
template<typename Key , class Cmp = std::less<Key>>
nat_t Designar::RankedTreap< Key, Cmp >::size ( ) const
inline
template<typename Key , class Cmp = std::less<Key>>
std::tuple<RankedTreap, RankedTreap> Designar::RankedTreap< Key, Cmp >::split_key ( const Key &  k)
inline
template<typename Key , class Cmp = std::less<Key>>
std::tuple<RankedTreap, RankedTreap> Designar::RankedTreap< Key, Cmp >::split_key_dup ( const Key &  k)
inline
template<typename Key , class Cmp = std::less<Key>>
std::tuple<RankedTreap, RankedTreap> Designar::RankedTreap< Key, Cmp >::split_pos ( nat_t  i)
inline
template<typename Key , class Cmp = std::less<Key>>
void Designar::RankedTreap< Key, Cmp >::swap ( RankedTreap< Key, Cmp > &  t)
inline
template<typename Key , class Cmp = std::less<Key>>
bool Designar::RankedTreap< Key, Cmp >::verify ( ) const
inline
template<typename Key , class Cmp = std::less<Key>>
bool Designar::RankedTreap< Key, Cmp >::verify_dup ( ) const
inline

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