|
mCRL2
|
A unordered_map class in which aterms can be stored. More...
#include <unordered_map.h>
Public Types | |
| using | key_type = typename super::key_type |
| Standard typedefs. | |
| using | mapped_type = typename super::mapped_type |
| using | allocator_type = typename super::allocator_type |
| using | value_type = typename super::value_type |
| using | size_type = typename super::size_type |
| using | reference = typename super::reference |
| using | const_reference = typename super::const_reference |
| using | iterator = typename super::iterator |
| using | const_iterator = typename super::const_iterator |
Public Member Functions | |
| unordered_map () | |
| Default constructor. | |
| unordered_map (size_type n) | |
| Constructor. | |
| unordered_map (const unordered_map &x) | |
| Constructor. | |
| unordered_map (unordered_map &&x) noexcept | |
| Constructor. | |
| unordered_map & | operator= (const unordered_map &other) |
| Standard assignment. | |
| unordered_map & | operator= (unordered_map &&other) noexcept |
| Standard move assignment. | |
| ~unordered_map ()=default | |
| Standard destructor. | |
| void | clear () noexcept |
| template<typename ... Args> | |
| iterator | find (const Args &... args) |
| Standard find function in a map. | |
| template<typename ... Args> | |
| const_iterator | find (const Args &... args) const |
| Standard find function in a map. | |
| std::pair< iterator, bool > | insert (const value_type &value) |
| template<class P > | |
| std::pair< iterator, bool > | insert (P &&value) |
| iterator | insert (const_iterator hint, value_type &&value) |
| template<class P > | |
| iterator | insert (const_iterator hint, P &&value) |
| template<class InputIt > | |
| void | insert (InputIt first, InputIt last) |
| void | insert (std::initializer_list< value_type > ilist) |
| template<class M > | |
| std::pair< iterator, bool > | insert_or_assign (const Key &k, M &&obj) |
| template<class M > | |
| std::pair< iterator, bool > | insert_or_assign (Key &&k, M &&obj) |
| template<class M > | |
| iterator | insert_or_assign (const_iterator hint, const Key &k, M &&obj) |
| template<class M > | |
| iterator | insert_or_assign (const_iterator hint, Key &&k, M &&obj) |
| template<class... Args> | |
| std::pair< iterator, bool > | emplace (Args &&... args) |
| template<class... Args> | |
| iterator | emplace_hint (const_iterator hint, Args &&... args) |
| template<class... Args> | |
| std::pair< iterator, bool > | try_emplace (const Key &k, Args &&... args) |
| template<class... Args> | |
| std::pair< iterator, bool > | try_emplace (Key &&k, Args &&... args) |
| template<class... Args> | |
| iterator | try_emplace (const_iterator hint, const Key &k, Args &&... args) |
| template<class... Args> | |
| iterator | try_emplace (const_iterator hint, Key &&k, Args &&... args) |
| iterator | erase (iterator pos) |
| iterator | erase (const_iterator pos) |
| iterator | erase (const_iterator first, const_iterator last) |
| size_type | erase (const Key &key) |
| void | swap (unordered_map &other) noexcept |
| mapped_type & | operator[] (const key_type &key) |
| Provides access to the value associated with the given key, inserting a default value when the key is not yet present. | |
| const mapped_type & | at (const key_type &key) const |
| Provides access to the value associated with the given key. | |
| size_type | count (const key_type &key) const |
| std::size_t | size () const |
| 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 | max_size () const noexcept |
| void | mark (term_mark_stack &todo) const |
| Marks all stored terms during garbage collection; used when this container is an element of another protected container. | |
Protected Types | |
| using | super = mcrl2::utilities::unordered_map< detail::markable_aterm< Key >, detail::markable_aterm< T >, Hash, Pred, Alloc, ThreadSafe, false > |
Protected Member Functions | |
| void | rehash (std::size_t new_size) |
| void | rehash_if_needed () |
| Rehashes the container when the load factor is exceeded, re-checking the load factor under the exclusive lock when ThreadSafe to avoid redundant rehashes. | |
| bool | rehash_is_needed () const |
Protected Attributes | |
| super | m_container |
| detail::generic_aterm_container< super > | container_wrapper |
A unordered_map class in which aterms can be stored.
The API of a mcrl2::utilities::unordered_map is exposed by explicit forwarding (composition) instead of inheritance, such that every operation is guaranteed to acquire the necessary locks.
Definition at line 285 of file unordered_map.h.
| using atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::allocator_type = typename super::allocator_type |
Definition at line 299 of file unordered_map.h.
| using atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::const_iterator = typename super::const_iterator |
Definition at line 305 of file unordered_map.h.
| using atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::const_reference = typename super::const_reference |
Definition at line 303 of file unordered_map.h.
| using atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator = typename super::iterator |
Definition at line 304 of file unordered_map.h.
| using atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::key_type = typename super::key_type |
Standard typedefs.
Definition at line 297 of file unordered_map.h.
| using atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::mapped_type = typename super::mapped_type |
Definition at line 298 of file unordered_map.h.
| using atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::reference = typename super::reference |
Definition at line 302 of file unordered_map.h.
| using atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::size_type = typename super::size_type |
Definition at line 301 of file unordered_map.h.
|
protected |
Definition at line 288 of file unordered_map.h.
| using atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::value_type = typename super::value_type |
Definition at line 300 of file unordered_map.h.
|
inline |
Default constructor.
Definition at line 308 of file unordered_map.h.
|
inlineexplicit |
Constructor.
Definition at line 314 of file unordered_map.h.
|
inline |
Constructor.
Definition at line 320 of file unordered_map.h.
|
inlinenoexcept |
Constructor.
Definition at line 326 of file unordered_map.h.
|
default |
Standard destructor.
| const unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::mapped_type & atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::at | ( | const key_type & | key | ) | const |
Provides access to the value associated with the given key.
Definition at line 481 of file unordered_map_implementation.h.
| unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::begin |
Definition at line 682 of file unordered_map_implementation.h.
| unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::const_iterator atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::begin |
Definition at line 696 of file unordered_map_implementation.h.
| unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::const_iterator atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::cbegin |
Definition at line 710 of file unordered_map_implementation.h.
| unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::const_iterator atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::cend |
Definition at line 717 of file unordered_map_implementation.h.
|
noexcept |
Definition at line 439 of file unordered_map_implementation.h.
| unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::size_type atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::count | ( | const key_type & | key | ) | const |
Definition at line 489 of file unordered_map_implementation.h.
| std::pair< iterator, bool > atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::emplace | ( | Args &&... | args | ) |
| unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::emplace_hint | ( | const_iterator | hint, |
| Args &&... | args | ||
| ) |
Definition at line 594 of file unordered_map_implementation.h.
|
noexcept |
Definition at line 724 of file unordered_map_implementation.h.
| unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::end |
Definition at line 689 of file unordered_map_implementation.h.
| unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::const_iterator atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::end |
Definition at line 703 of file unordered_map_implementation.h.
| unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::size_type atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::erase | ( | const Key & | key | ) |
Definition at line 659 of file unordered_map_implementation.h.
| unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::erase | ( | const_iterator | first, |
| const_iterator | last | ||
| ) |
Definition at line 210 of file unordered_map_implementation.h.
| unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::erase | ( | const_iterator | pos | ) |
Definition at line 645 of file unordered_map_implementation.h.
| unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::erase | ( | iterator | pos | ) |
Definition at line 196 of file unordered_map_implementation.h.
| unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::find | ( | const Args &... | args | ) |
Standard find function in a map.
Definition at line 447 of file unordered_map_implementation.h.
| unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::const_iterator atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::find | ( | const Args &... | args | ) | const |
Standard find function in a map.
Definition at line 459 of file unordered_map_implementation.h.
| std::pair< typename unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator, bool > atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::insert | ( | const value_type & | value | ) |
Definition at line 496 of file unordered_map_implementation.h.
| unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::insert | ( | const_iterator | hint, |
| P && | value | ||
| ) |
Definition at line 522 of file unordered_map_implementation.h.
| unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::insert | ( | const_iterator | hint, |
| value_type && | value | ||
| ) |
Definition at line 513 of file unordered_map_implementation.h.
| void atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::insert | ( | InputIt | first, |
| InputIt | last | ||
| ) |
Definition at line 531 of file unordered_map_implementation.h.
| std::pair< iterator, bool > atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::insert | ( | P && | value | ) |
| void atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::insert | ( | std::initializer_list< value_type > | ilist | ) |
Definition at line 95 of file unordered_map_implementation.h.
| std::pair< iterator, bool > atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::insert_or_assign | ( | const Key & | k, |
| M && | obj | ||
| ) |
| unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::insert_or_assign | ( | const_iterator | hint, |
| const Key & | k, | ||
| M && | obj | ||
| ) |
Definition at line 567 of file unordered_map_implementation.h.
| unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::insert_or_assign | ( | const_iterator | hint, |
| Key && | k, | ||
| M && | obj | ||
| ) |
Definition at line 576 of file unordered_map_implementation.h.
| std::pair< iterator, bool > atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::insert_or_assign | ( | Key && | k, |
| M && | obj | ||
| ) |
|
inline |
Marks all stored terms during garbage collection; used when this container is an element of another protected container.
Definition at line 450 of file unordered_map.h.
|
noexcept |
Definition at line 731 of file unordered_map_implementation.h.
| unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe > & atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::operator= | ( | const unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe > & | other | ) |
Standard assignment.
Definition at line 25 of file unordered_map_implementation.h.
|
noexcept |
Standard move assignment.
Definition at line 36 of file unordered_map_implementation.h.
| unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::mapped_type & atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::operator[] | ( | const key_type & | key | ) |
Provides access to the value associated with the given key, inserting a default value when the key is not yet present.
Definition at line 471 of file unordered_map_implementation.h.
|
inlineprotected |
Definition at line 392 of file unordered_map_implementation.h.
|
inlineprotected |
Rehashes the container when the load factor is exceeded, re-checking the load factor under the exclusive lock when ThreadSafe to avoid redundant rehashes.
Definition at line 414 of file unordered_map_implementation.h.
|
inlineprotected |
Definition at line 408 of file unordered_map_implementation.h.
|
inline |
Definition at line 423 of file unordered_map.h.
|
noexcept |
Definition at line 224 of file unordered_map_implementation.h.
| std::pair< iterator, bool > atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::try_emplace | ( | const Key & | k, |
| Args &&... | args | ||
| ) |
| unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::try_emplace | ( | const_iterator | hint, |
| const Key & | k, | ||
| Args &&... | args | ||
| ) |
Definition at line 621 of file unordered_map_implementation.h.
| unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::try_emplace | ( | const_iterator | hint, |
| Key && | k, | ||
| Args &&... | args | ||
| ) |
Definition at line 630 of file unordered_map_implementation.h.
| std::pair< iterator, bool > atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::try_emplace | ( | Key && | k, |
| Args &&... | args | ||
| ) |
|
protected |
Definition at line 292 of file unordered_map.h.
|
protected |
Definition at line 291 of file unordered_map.h.