|
mCRL2
|
A class for a map of keys to values in T based using the simple hash table set implementation. More...
#include <unordered_map.h>
Classes | |
| struct | PairEquals |
| struct | PairHash |
Public Types | |
| using | key_type = Key |
| using | mapped_type = T |
| using | value_type = std::pair< const Key, T > |
| using | node_type = value_type |
| using | size_type = std::size_t |
| using | difference_type = std::ptrdiff_t |
| using | hasher = Hash |
| using | key_equal = KeyEqual |
| using | allocator_type = typename std::allocator_traits< Allocator >::template rebind_alloc< value_type > |
| using | reference = value_type & |
| using | const_reference = const value_type & |
| using | pointer = typename std::allocator_traits< Allocator >::pointer |
| using | const_pointer = typename std::allocator_traits< Allocator >::const_pointer |
| using | iterator = typename Set::template unordered_set_iterator< bucket_type, false > |
| using | const_iterator = typename Set::const_iterator |
| using | local_iterator = typename bucket_type::iterator |
| using | const_local_iterator = typename Set::const_local_iterator |
| using | insert_return_type = typename std::pair< unordered_map::iterator, bool > |
Public Member Functions | |
| unordered_map () | |
| unordered_map (std::size_t initial_size, const hasher &hash=hasher(), const key_equal &equals=key_equal()) | |
| Constructs an unordered_map that can store initial_size number of elements before resizing. | |
| const allocator_type & | get_allocator () const noexcept |
| allocator_type & | get_allocator () noexcept |
| iterator | begin () |
| iterator | end () |
| const_iterator | begin () const |
| const_iterator | end () const |
| const_iterator | cbegin () const |
| const_iterator | cend () const |
| bool | empty () const noexcept |
| size_type | size () const |
| size_type | max_size () const noexcept |
| void | clear () |
| Clears the content. | |
| std::pair< iterator, bool > | insert (const value_type &pair) |
| Inserts elements. | |
| std::pair< iterator, bool > | insert (const_iterator, const value_type &pair) |
| template<typename ... Args> | |
| std::pair< iterator, bool > | emplace (Args &&... args) |
| template<typename ... Args> | |
| iterator | emplace_hint (const_iterator, Args &&... args) |
| template<typename ... Args> | |
| std::pair< iterator, bool > | try_emplace (const key_type &key, Args &&... args) |
| template<class... Args> | |
| iterator | try_emplace (const_iterator, const Key &k, Args &&... args) |
| template<class... Args> | |
| iterator | try_emplace (const_iterator, Key &&k, Args &&... args) |
| template<typename M > | |
| std::pair< iterator, bool > | insert_or_assign (const Key &k, M &&obj) |
| template<typename M > | |
| std::pair< iterator, bool > | insert_or_assign (Key &&k, M &&obj) |
| template<typename M > | |
| std::pair< iterator, bool > | insert_or_assign (const_iterator, const Key &k, M &&obj) |
| template<typename M > | |
| std::pair< iterator, bool > | insert_or_assign (const_iterator, Key &&k, M &&obj) |
| void | erase (const key_type &key) |
| Erases elements. | |
| iterator | erase (const_iterator it) |
| const T & | at (const key_type &key) const |
| Provides access to the value associated with the given key. | |
| mapped_type & | operator[] (const key_type &key) |
| Provides access to the value associated with the given key, constructs a default value whenever the key was undefined. | |
| size_type | count (const key_type &key) const |
| template<typename ... Args> | |
| iterator | find (const Args &... args) |
| template<typename ... Args> | |
| const_iterator | find (const Args &... args) const |
| local_iterator | begin (size_type n) |
| local_iterator | end (size_type n) |
| const_local_iterator | begin (size_type n) const |
| const_local_iterator | end (size_type n) const |
| const_local_iterator | cbegin (size_type n) const |
| const_local_iterator | cend (size_type n) const |
| size_type | bucket_count () const noexcept |
| size_type | max_bucket_count () const noexcept |
| size_type | bucket_size (size_type n) const noexcept |
| size_type | bucket (const key_type &key) const noexcept |
| float | load_factor () const |
| float | max_load_factor () const |
| void | max_load_factor (float factor) |
| void | rehash (size_type number_of_buckets) |
| Resize the number buckets to at least number_of_buckets. | |
| void | reserve (size_type count) |
| Resizes the set to the given number of elements. | |
| hasher | hash_function () const |
| key_equal | key_eq () const |
| size_type | capacity () |
| Number of elements that can be stored before rehash. | |
| template<class M > | |
| std::pair< typename unordered_map< Key, T, Hash, Pred, Alloc >::iterator, bool > | insert_or_assign (const Key &k, M &&obj) |
| template<class M > | |
| std::pair< typename unordered_map< Key, T, Hash, Pred, Alloc >::iterator, bool > | insert_or_assign (Key &&k, M &&obj) |
| template<class M > | |
| unordered_map< Key, T, Hash, Pred, Alloc >::iterator | insert_or_assign (const_iterator hint, const Key &k, M &&obj) |
| template<class M > | |
| unordered_map< Key, T, Hash, Pred, Alloc >::iterator | insert_or_assign (const_iterator hint, Key &&k, M &&obj) |
| template<class... Args> | |
| std::pair< typename unordered_map< Key, T, Hash, Pred, Alloc >::iterator, bool > | emplace (Args &&... args) |
| template<class... Args> | |
| std::pair< typename unordered_map< Key, T, Hash, Pred, Alloc >::iterator, bool > | try_emplace (const Key &k, Args &&... args) |
| template<class... Args> | |
| std::pair< typename unordered_map< Key, T, Hash, Pred, Alloc >::iterator, bool > | try_emplace (Key &&k, Args &&... args) |
| template<class M > | |
| std::pair< typename unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator, bool > | insert_or_assign (const Key &k, M &&obj) |
| template<class M > | |
| std::pair< typename unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator, bool > | insert_or_assign (Key &&k, M &&obj) |
| template<class... Args> | |
| std::pair< typename unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator, bool > | emplace (Args &&... args) |
| template<class... Args> | |
| std::pair< typename unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator, bool > | try_emplace (const Key &k, Args &&... args) |
| template<class... Args> | |
| std::pair< typename unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator, bool > | try_emplace (Key &&k, Args &&... args) |
Private Types | |
| using | Set = unordered_set< value_type, PairHash, PairEquals, allocator_type, ThreadSafe, Resize > |
| using | bucket_type = typename Set::bucket_type |
Private Attributes | |
| Set | m_set |
| The underlying set storing <key, value> pairs. | |
Static Private Attributes | |
| static constexpr bool | allow_transparent = detail::is_transparent<Hash>() && detail::is_transparent<KeyEqual>() |
| True iff the hash and equals functions allow transparent lookup,. | |
A class for a map of keys to values in T based using the simple hash table set implementation.
Definition at line 28 of file unordered_map.h.
| using mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::allocator_type = typename std::allocator_traits<Allocator>::template rebind_alloc<value_type> |
Definition at line 40 of file unordered_map.h.
|
private |
Definition at line 104 of file unordered_map.h.
| using mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::const_iterator = typename Set::const_iterator |
Definition at line 110 of file unordered_map.h.
| using mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::const_local_iterator = typename Set::const_local_iterator |
Definition at line 112 of file unordered_map.h.
| using mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::const_pointer = typename std::allocator_traits<Allocator>::const_pointer |
Definition at line 45 of file unordered_map.h.
| using mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::const_reference = const value_type& |
Definition at line 43 of file unordered_map.h.
| using mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::difference_type = std::ptrdiff_t |
Definition at line 36 of file unordered_map.h.
| using mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::hasher = Hash |
Definition at line 38 of file unordered_map.h.
| using mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::insert_return_type = typename std::pair<unordered_map::iterator, bool> |
Definition at line 113 of file unordered_map.h.
| using mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::iterator = typename Set::template unordered_set_iterator<bucket_type, false> |
Definition at line 109 of file unordered_map.h.
| using mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::key_equal = KeyEqual |
Definition at line 39 of file unordered_map.h.
| using mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::key_type = Key |
Definition at line 31 of file unordered_map.h.
| using mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::local_iterator = typename bucket_type::iterator |
Definition at line 111 of file unordered_map.h.
| using mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::mapped_type = T |
Definition at line 32 of file unordered_map.h.
| using mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::node_type = value_type |
Definition at line 34 of file unordered_map.h.
| using mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::pointer = typename std::allocator_traits<Allocator>::pointer |
Definition at line 44 of file unordered_map.h.
| using mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::reference = value_type& |
Definition at line 42 of file unordered_map.h.
|
private |
Definition at line 103 of file unordered_map.h.
| using mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::size_type = std::size_t |
Definition at line 35 of file unordered_map.h.
| using mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::value_type = std::pair<const Key, T> |
Definition at line 33 of file unordered_map.h.
|
inline |
Definition at line 115 of file unordered_map.h.
|
inline |
Constructs an unordered_map that can store initial_size number of elements before resizing.
Definition at line 120 of file unordered_map.h.
| const unordered_map< Key, T, Hash, Pred, Alloc >::mapped_type & atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::at | ( | const key_type & | key | ) | const |
Provides access to the value associated with the given key.
Definition at line 260 of file unordered_map_implementation.h.
|
inline |
Definition at line 130 of file unordered_map.h.
|
inline |
Definition at line 133 of file unordered_map.h.
|
inline |
Definition at line 221 of file unordered_map.h.
|
inline |
Definition at line 224 of file unordered_map.h.
|
inlinenoexcept |
Definition at line 235 of file unordered_map.h.
|
inlinenoexcept |
Definition at line 231 of file unordered_map.h.
|
inlinenoexcept |
Definition at line 234 of file unordered_map.h.
|
inline |
Number of elements that can be stored before rehash.
Nonstandard.
Definition at line 255 of file unordered_map.h.
|
inline |
Definition at line 136 of file unordered_map.h.
|
inline |
Definition at line 227 of file unordered_map.h.
|
inline |
Definition at line 137 of file unordered_map.h.
|
inline |
Definition at line 228 of file unordered_map.h.
|
inlinenoexcept |
Clears the content.
Definition at line 147 of file unordered_map.h.
|
inline |
Definition at line 211 of file unordered_map.h.
| std::pair< typename unordered_map< Key, T, Hash, Pred, Alloc >::iterator, bool > mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::emplace | ( | Args &&... | args | ) |
Definition at line 149 of file unordered_map_implementation.h.
| std::pair< typename unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator, bool > mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::emplace | ( | Args &&... | args | ) |
Definition at line 585 of file unordered_map_implementation.h.
|
inline |
Definition at line 155 of file unordered_map.h.
|
inline |
Definition at line 158 of file unordered_map.h.
|
inlinenoexcept |
Definition at line 140 of file unordered_map.h.
|
inline |
Definition at line 131 of file unordered_map.h.
|
inline |
Definition at line 134 of file unordered_map.h.
|
inline |
Definition at line 222 of file unordered_map.h.
|
inline |
Definition at line 225 of file unordered_map.h.
|
inline |
Erases elements.
Definition at line 200 of file unordered_map.h.
|
inline |
Definition at line 201 of file unordered_map.h.
|
inline |
Definition at line 215 of file unordered_map.h.
|
inline |
Definition at line 218 of file unordered_map.h.
|
inlinenoexcept |
Definition at line 127 of file unordered_map.h.
|
inlinenoexcept |
Definition at line 128 of file unordered_map.h.
|
inline |
Definition at line 250 of file unordered_map.h.
|
inline |
Inserts elements.
Inserts an element referring to a default value in the map.
Definition at line 150 of file unordered_map.h.
|
inline |
Definition at line 152 of file unordered_map.h.
| std::pair< typename unordered_map< Key, T, Hash, Pred, Alloc >::iterator, bool > mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::insert_or_assign | ( | const Key & | k, |
| M && | obj | ||
| ) |
Definition at line 117 of file unordered_map_implementation.h.
| std::pair< typename unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator, bool > mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::insert_or_assign | ( | const Key & | k, |
| M && | obj | ||
| ) |
Definition at line 549 of file unordered_map_implementation.h.
|
inline |
Definition at line 170 of file unordered_map.h.
| unordered_map< Key, T, Hash, Pred, Alloc >::iterator mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::insert_or_assign | ( | const_iterator | hint, |
| const Key & | k, | ||
| M && | obj | ||
| ) |
Definition at line 133 of file unordered_map_implementation.h.
| unordered_map< Key, T, Hash, Pred, Alloc >::iterator mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::insert_or_assign | ( | const_iterator | hint, |
| Key && | k, | ||
| M && | obj | ||
| ) |
Definition at line 141 of file unordered_map_implementation.h.
|
inline |
Definition at line 194 of file unordered_map.h.
|
inline |
Definition at line 197 of file unordered_map.h.
| std::pair< typename unordered_map< Key, T, Hash, Pred, Alloc >::iterator, bool > mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::insert_or_assign | ( | Key && | k, |
| M && | obj | ||
| ) |
Definition at line 125 of file unordered_map_implementation.h.
| std::pair< typename unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator, bool > mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::insert_or_assign | ( | Key && | k, |
| M && | obj | ||
| ) |
Definition at line 558 of file unordered_map_implementation.h.
|
inline |
Definition at line 182 of file unordered_map.h.
|
inline |
Definition at line 251 of file unordered_map.h.
|
inline |
Definition at line 237 of file unordered_map.h.
|
inlinenoexcept |
Definition at line 232 of file unordered_map.h.
|
inline |
Definition at line 238 of file unordered_map.h.
|
inline |
Definition at line 239 of file unordered_map.h.
|
inlinenoexcept |
Definition at line 144 of file unordered_map.h.
| unordered_map< Key, T, Hash, Pred, Alloc >::mapped_type & atermpp::unordered_map< Key, T, Hash, Pred, Alloc >::operator[] | ( | const key_type & | key | ) |
Provides access to the value associated with the given key, constructs a default value whenever the key was undefined.
Definition at line 245 of file unordered_map_implementation.h.
|
inline |
Resize the number buckets to at least number_of_buckets.
Definition at line 242 of file unordered_map.h.
|
inline |
Resizes the set to the given number of elements.
Definition at line 248 of file unordered_map.h.
|
inline |
Definition at line 143 of file unordered_map.h.
| std::pair< typename unordered_map< Key, T, Hash, Pred, Alloc >::iterator, bool > mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::try_emplace | ( | const Key & | k, |
| Args &&... | args | ||
| ) |
Definition at line 165 of file unordered_map_implementation.h.
| std::pair< typename unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator, bool > mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::try_emplace | ( | const Key & | k, |
| Args &&... | args | ||
| ) |
Definition at line 603 of file unordered_map_implementation.h.
| std::pair< iterator, bool > mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::try_emplace | ( | const key_type & | key, |
| Args &&... | args | ||
| ) |
|
inline |
Definition at line 164 of file unordered_map.h.
|
inline |
Definition at line 167 of file unordered_map.h.
| std::pair< typename unordered_map< Key, T, Hash, Pred, Alloc >::iterator, bool > mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::try_emplace | ( | Key && | k, |
| Args &&... | args | ||
| ) |
Definition at line 173 of file unordered_map_implementation.h.
| std::pair< typename unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator, bool > mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::try_emplace | ( | Key && | k, |
| Args &&... | args | ||
| ) |
Definition at line 612 of file unordered_map_implementation.h.
|
staticconstexprprivate |
True iff the hash and equals functions allow transparent lookup,.
Definition at line 49 of file unordered_map.h.
|
private |
The underlying set storing <key, value> pairs.
Definition at line 106 of file unordered_map.h.