Template Class ThreadedTree

Nested Relationships

Nested Types

Class Documentation

template<std::totally_ordered K>
class ThreadedTree

a binary search tree with threads in symmetric order

Public Types

using value_type = K
using size_type = std::size_t
using difference_type = std::ptrdiff_t
using reference = const K&
using const_reference = const K&
using iterator = const_iterator

Public Functions

ThreadedTree(void)
ThreadedTree(const ThreadedTree&) = delete
ThreadedTree &operator=(const ThreadedTree&) = delete
~ThreadedTree()
void insert(const K &k)

inserts k, if it is not there

Post:

k is there

bool contains(const K &k) const
std::size_t size(void) const
template<class F>
void forEach(F &&f) const

f( k ) on the keys by increasing order, by the threads: no stack, no recursion

std::vector<K> reversed(void) const

the keys by decreasing order, by the left threads

inline const_iterator begin(void) const
inline const_iterator end(void) const
inline const_iterator cbegin(void) const
inline const_iterator cend(void) const
class const_iterator

Public Types

using iterator_category = std::bidirectional_iterator_tag
using value_type = K
using difference_type = std::ptrdiff_t
using reference = const K&
using pointer = const K*

Public Functions

const_iterator(void) = default
inline const_iterator(const ThreadedTree *t, const Node *x)
inline reference operator*(void) const
inline pointer operator->(void) const
inline const_iterator &operator++(void)
inline const_iterator &operator--(void)
inline const_iterator operator++(int)
inline const_iterator operator--(int)
inline bool operator==(const const_iterator &o) const