mCRL2
|
A unordered_map class in which aterms can be stored. More...
#include <unordered_map.h>
Public Types | |
typedef super::allocator_type | allocator_type |
Standard typedefs. | |
typedef super::value_type | value_type |
typedef super::size_type | size_type |
typedef super::reference | reference |
typedef super::iterator | iterator |
typedef super::const_iterator | const_iterator |
Public Types inherited from mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize > | |
using | key_type = Key |
using | mapped_type = T |
using | value_type = std::pair< const Key, T > |
typedef value_type | node_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 |
typedef std::pair< unordered_map::iterator, bool > | insert_return_type |
Public Member Functions | |
unordered_map () | |
Default constructor. | |
unordered_map (const allocator_type &alloc) | |
Constructor. | |
unordered_map (size_type n, const allocator_type &alloc=allocator_type()) | |
Constructor. | |
unordered_map (size_type n, const value_type &val, const allocator_type &alloc=allocator_type()) | |
template<class InputIterator > | |
unordered_map (InputIterator first, InputIterator last, const allocator_type &alloc=allocator_type()) | |
Constructor. | |
unordered_map (const unordered_map &x) | |
Constructor. | |
unordered_map (const unordered_map &x, const allocator_type &alloc) | |
Constructor. | |
unordered_map (unordered_map &&x) | |
Constructor. | |
unordered_map (unordered_map &&x, const allocator_type &alloc) | |
Constructor. | |
unordered_map (std::initializer_list< value_type > il, const allocator_type &alloc=allocator_type()) | |
Constructor. To be done later.... | |
unordered_map & | operator= (const unordered_map &other)=default |
Standard assignment. | |
unordered_map & | operator= (unordered_map &&other)=default |
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) |
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 |
Public Member Functions inherited from mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize > | |
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 hint, 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 (Key &&k, M &&obj) |
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 (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. | |
Protected Types | |
typedef mcrl2::utilities::unordered_map< detail::reference_aterm< Key >, detail::reference_aterm< T >, Hash, Pred, Alloc, ThreadSafe, false > | super |
Protected Member Functions | |
void | rehash (std::size_t) |
Function below is implemented in a .cpp file. | |
void | rehash_if_needed () |
Protected Attributes | |
detail::generic_aterm_container< mcrl2::utilities::unordered_map< detail::reference_aterm< Key >, detail::reference_aterm< T >, Hash, Pred, Alloc, ThreadSafe, false > > | container_wrapper |
A unordered_map class in which aterms can be stored.
Definition at line 241 of file unordered_map.h.
typedef super::allocator_type atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::allocator_type |
Standard typedefs.
Definition at line 252 of file unordered_map.h.
typedef super::const_iterator atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::const_iterator |
Definition at line 257 of file unordered_map.h.
typedef super::iterator atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator |
Definition at line 256 of file unordered_map.h.
typedef super::reference atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::reference |
Definition at line 255 of file unordered_map.h.
typedef super::size_type atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::size_type |
Definition at line 254 of file unordered_map.h.
|
protected |
Definition at line 245 of file unordered_map.h.
typedef super::value_type atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::value_type |
Definition at line 253 of file unordered_map.h.
|
inline |
Default constructor.
Definition at line 260 of file unordered_map.h.
|
inlineexplicit |
Constructor.
Definition at line 266 of file unordered_map.h.
|
inlineexplicit |
Constructor.
Definition at line 272 of file unordered_map.h.
|
inline |
Definition at line 277 of file unordered_map.h.
|
inline |
Constructor.
Definition at line 284 of file unordered_map.h.
|
inline |
Constructor.
Definition at line 290 of file unordered_map.h.
|
inline |
Constructor.
Definition at line 296 of file unordered_map.h.
|
inline |
Constructor.
Definition at line 302 of file unordered_map.h.
|
inline |
Constructor.
Definition at line 308 of file unordered_map.h.
|
inline |
Constructor. To be done later....
Definition at line 314 of file unordered_map.h.
|
default |
Standard destructor.
unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::iterator atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::begin |
Definition at line 563 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 577 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 591 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 598 of file unordered_map_implementation.h.
|
noexcept |
Definition at line 340 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 484 of file unordered_map_implementation.h.
|
noexcept |
Definition at line 605 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 570 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 584 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 549 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 542 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 535 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 528 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 348 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 360 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 371 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 397 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 388 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 406 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 414 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 457 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 466 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 | ||
) |
|
noexcept |
Definition at line 612 of file unordered_map_implementation.h.
|
default |
Standard assignment.
|
default |
Standard move assignment.
|
inlineprotected |
Function below is implemented in a .cpp file.
Definition at line 312 of file unordered_map_implementation.h.
|
inlineprotected |
Definition at line 327 of file unordered_map_implementation.h.
|
inline |
Definition at line 419 of file unordered_map.h.
void atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >::swap | ( | unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe > & | other | ) |
Definition at line 556 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 511 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 520 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 247 of file unordered_map.h.