45template <
class TKey,
class TValue,
class TKeyComp = std::less<TKey>,
46 class TAlloc = std::allocator<std::pair<const TKey, TValue>>>
53 using value_type = std::pair<const key_type, mapped_type>;
77 return comp(a.first, b.first);
82 return comp(a, b.first);
87 return comp(a.first, b);
102 using pointer =
typename alloc_traits::pointer;
Declarations of the ethereal AVL tree.
Declarations and implementation of the ethereal AVL tree iterator.
The AVL tree iterator type.
Definition _avl_iterator.hpp:34
A map type using an AVL tree as the underlying structure.
Definition map.hpp:47
iterator erase(iterator pos) noexcept
Erases an item.
Definition map.ipp:389
iterator upper_bound(const key_type &key) noexcept
Returns an iterator to the first item which is greater that the given key.
Definition map.ipp:175
iterator find(const key_type &key) noexcept
Finds an item with the given key.
Definition map.ipp:132
int get_height() const noexcept
Returns the height of the underlying tree.
Definition map.ipp:291
typename alloc_traits::const_pointer const_pointer
Definition map.hpp:103
reverse_iterator rbegin() noexcept
Returns a reverse iterator to the biggest item.
Definition map.ipp:243
iterator begin() noexcept
Returns an iterator to the smallest item.
Definition map.ipp:207
key_compare key_comp() const noexcept
Returns the function that compares keys.
Definition map.ipp:76
const_iterator cbegin() const noexcept
Returns explicitly a constant iterator to the smallest item.
Definition map.ipp:219
void clear() noexcept
Erases the whole tree.
Definition map.ipp:298
mapped_type & at(const key_type &key)
Access specified item.
Definition map.ipp:90
~map() noexcept
Definition map.ipp:62
std::allocator_traits< allocator_type > alloc_traits
Definition map.hpp:98
detail::avl_iterator< tree_type, false > iterator
Definition map.hpp:113
value_type & reference
Definition map.hpp:55
void swap(map &other) noexcept
Swaps the content.
Definition map.ipp:418
const_reverse_iterator crbegin() const noexcept
Returns explicitly a constant reverse iterator to the biggest item.
Definition map.ipp:255
map & operator=(const map &other)
Definition map.ipp:39
std::reverse_iterator< const_iterator > const_reverse_iterator
Definition map.hpp:117
std::pair< iterator, bool > insert_or_assign(const key_type &key, TMapped &&value)
Inserts an item or assigns the value.
std::pair< const key_type, mapped_type > value_type
Definition map.hpp:53
iterator end() noexcept
Returns an iterator to the end.
Definition map.ipp:225
typename alloc_traits::size_type size_type
Definition map.hpp:99
std::pair< iterator, bool > try_emplace(const key_type &key, Args &&...args)
Construct an item in-place.
map()
Definition map.ipp:20
typename alloc_traits::difference_type difference_type
Definition map.hpp:100
const value_type & const_reference
Definition map.hpp:56
typename alloc_traits::pointer pointer
Definition map.hpp:102
TKeyComp key_compare
Definition map.hpp:60
TAlloc allocator_type
Definition map.hpp:97
std::string to_dot(bool print_invis) const
Returns the dot representation of the tree.
Definition map.ipp:428
std::reverse_iterator< iterator > reverse_iterator
Definition map.hpp:116
allocator_type get_allocator() const noexcept
Returns the associated allocator.
Definition map.ipp:70
const_iterator cend() const noexcept
Returns explicitly a constant iterator to the end.
Definition map.ipp:237
value_compare value_comp() const noexcept
Returns the function that compares keys in the key, value pairs.
Definition map.ipp:82
TKey key_type
Definition map.hpp:51
size_type size() const noexcept
Returns the current number of items.
Definition map.ipp:286
std::pair< iterator, bool > insert(const value_type &item)
Inserts an item.
Definition map.ipp:304
const_reverse_iterator crend() const noexcept
Returns explicitly a constant reverse iterator to the end.
Definition map.ipp:273
bool contains(const key_type &key) const noexcept
Checks whether there exists an item with given key in the tree.
Definition map.ipp:145
TValue mapped_type
Definition map.hpp:52
bool empty() const noexcept
Checks whether the map contains any values.
Definition map.ipp:280
iterator lower_bound(const key_type &key) noexcept
Returns an iterator to the first item which is not less than the given key.
Definition map.ipp:160
size_type count(const key_type &key) const noexcept
Returns the number of items with the given key (0 or 1).
Definition map.ipp:153
detail::avl_iterator< tree_type, true > const_iterator
Definition map.hpp:114
std::pair< iterator, iterator > equal_range(const key_type &key) noexcept
Returns a range containing all the items with the given key.
Definition map.ipp:191
reverse_iterator rend() noexcept
Returns a reverse iterator to the end.
Definition map.ipp:261
Declarations of the persistent map.
Definition _avl.hpp:14
value_compare(key_compare c)
Definition map.hpp:73
bool operator()(const key_type &a, const key_type &b) const noexcept
Definition map.hpp:90
key_compare comp
Definition map.hpp:70
bool operator()(const value_type &a, const value_type &b) const noexcept
Definition map.hpp:75
bool operator()(const value_type &a, const key_type &b) const noexcept
Definition map.hpp:85
bool operator()(const key_type &a, const value_type &b) const noexcept
Definition map.hpp:80