mCRL2
Loading...
Searching...
No Matches
mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize > Class Template Reference

A class for a map of keys to values in T based using the simple hash table set implementation. More...

#include <unordered_map.h>

Inheritance diagram for mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >:
atermpp::utilities::unordered_map< atermpp::aterm, atermpp::term_list< data::data_expression_list >, detail::cache_hash, detail::cache_equality, std::allocator< std::pair< atermpp::aterm, atermpp::term_list< data::data_expression_list > > >, true > atermpp::utilities::unordered_map< data::variable, data_expression > atermpp::utilities::unordered_map< VariableType, ExpressionType > atermpp::utilities::unordered_map< atermpp::term_balanced_tree, std::size_t > atermpp::utilities::unordered_map< mcrl2::pbes_system::pbes_expression, index_type, std::hash< atermpp::detail::reference_aterm< mcrl2::pbes_system::pbes_expression > >, std::equal_to< atermpp::detail::reference_aterm< mcrl2::pbes_system::pbes_expression > >, std::allocator< std::pair< const atermpp::detail::reference_aterm< mcrl2::pbes_system::pbes_expression >, atermpp::detail::reference_aterm< index_type > > >, true > atermpp::utilities::unordered_map< Key, T, Hash, Pred, Alloc, ThreadSafe >

Classes

struct  PairEquals
 
struct  PairHash
 

Public Types

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 ()
 
 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_typeget_allocator () const noexcept
 
allocator_typeget_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_typeoperator[] (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.
 

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,.
 

Detailed Description

template<typename Key, typename T, typename Hash, typename KeyEqual, typename Allocator, bool ThreadSafe, bool Resize>
class mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >

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.

Member Typedef Documentation

◆ allocator_type

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
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.

◆ bucket_type

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
using mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::bucket_type = typename Set::bucket_type
private

Definition at line 102 of file unordered_map.h.

◆ const_iterator

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
using mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::const_iterator = typename Set::const_iterator

Definition at line 108 of file unordered_map.h.

◆ const_local_iterator

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
using mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::const_local_iterator = typename Set::const_local_iterator

Definition at line 110 of file unordered_map.h.

◆ const_pointer

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
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.

◆ const_reference

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
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.

◆ difference_type

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
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.

◆ hasher

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
using mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::hasher = Hash

Definition at line 38 of file unordered_map.h.

◆ insert_return_type

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
typedef std::pair<unordered_map::iterator, bool> mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::insert_return_type

Definition at line 111 of file unordered_map.h.

◆ iterator

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
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 107 of file unordered_map.h.

◆ key_equal

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
using mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::key_equal = KeyEqual

Definition at line 39 of file unordered_map.h.

◆ key_type

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
using mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::key_type = Key

Definition at line 31 of file unordered_map.h.

◆ local_iterator

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
using mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::local_iterator = typename bucket_type::iterator

Definition at line 109 of file unordered_map.h.

◆ mapped_type

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
using mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::mapped_type = T

Definition at line 32 of file unordered_map.h.

◆ node_type

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
typedef value_type mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::node_type

Definition at line 34 of file unordered_map.h.

◆ pointer

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
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.

◆ reference

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
using mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::reference = value_type&

Definition at line 42 of file unordered_map.h.

◆ Set

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
using mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::Set = unordered_set<value_type, PairHash, PairEquals, allocator_type, ThreadSafe, Resize>
private

Definition at line 101 of file unordered_map.h.

◆ size_type

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
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.

◆ value_type

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
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.

Constructor & Destructor Documentation

◆ unordered_map() [1/2]

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::unordered_map ( )
inline

Definition at line 113 of file unordered_map.h.

◆ unordered_map() [2/2]

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::unordered_map ( std::size_t  initial_size,
const hasher hash = hasher(),
const key_equal equals = key_equal() 
)
inline

Constructs an unordered_map that can store initial_size number of elements before resizing.

Definition at line 118 of file unordered_map.h.

Member Function Documentation

◆ at()

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
const T & mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::at ( const key_type key) const

Provides access to the value associated with the given key.

◆ begin() [1/4]

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
iterator mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::begin ( )
inline

Definition at line 128 of file unordered_map.h.

◆ begin() [2/4]

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
const_iterator mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::begin ( ) const
inline

Definition at line 131 of file unordered_map.h.

◆ begin() [3/4]

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
local_iterator mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::begin ( size_type  n)
inline
Returns
An iterator to the elements in the given bucket with index n.

Definition at line 213 of file unordered_map.h.

◆ begin() [4/4]

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
const_local_iterator mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::begin ( size_type  n) const
inline

Definition at line 216 of file unordered_map.h.

◆ bucket()

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
size_type mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::bucket ( const key_type key) const
inlinenoexcept

Definition at line 227 of file unordered_map.h.

◆ bucket_count()

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
size_type mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::bucket_count ( ) const
inlinenoexcept
Returns
The number of buckets.

Definition at line 223 of file unordered_map.h.

◆ bucket_size()

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
size_type mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::bucket_size ( size_type  n) const
inlinenoexcept

Definition at line 226 of file unordered_map.h.

◆ capacity()

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
size_type mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::capacity ( )
inline

Number of elements that can be stored before rehash.

Nonstandard.

Definition at line 247 of file unordered_map.h.

◆ cbegin() [1/2]

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
const_iterator mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::cbegin ( ) const
inline

Definition at line 134 of file unordered_map.h.

◆ cbegin() [2/2]

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
const_local_iterator mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::cbegin ( size_type  n) const
inline

Definition at line 219 of file unordered_map.h.

◆ cend() [1/2]

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
const_iterator mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::cend ( ) const
inline

Definition at line 135 of file unordered_map.h.

◆ cend() [2/2]

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
const_local_iterator mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::cend ( size_type  n) const
inline

Definition at line 220 of file unordered_map.h.

◆ clear()

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
void mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::clear ( )
inline

Clears the content.

Definition at line 145 of file unordered_map.h.

◆ count()

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
size_type mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::count ( const key_type key) const
inline
Returns
The number of elements matching the specified key.

Definition at line 203 of file unordered_map.h.

◆ emplace()

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
template<typename ... Args>
std::pair< iterator, bool > mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::emplace ( Args &&...  args)
inline

Definition at line 153 of file unordered_map.h.

◆ emplace_hint()

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
template<typename ... Args>
iterator mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::emplace_hint ( const_iterator  ,
Args &&...  args 
)
inline

Definition at line 156 of file unordered_map.h.

◆ empty()

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
bool mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::empty ( ) const
inlinenoexcept
Returns
True iff the set is empty.

Definition at line 138 of file unordered_map.h.

◆ end() [1/4]

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
iterator mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::end ( )
inline

Definition at line 129 of file unordered_map.h.

◆ end() [2/4]

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
const_iterator mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::end ( ) const
inline

Definition at line 132 of file unordered_map.h.

◆ end() [3/4]

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
local_iterator mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::end ( size_type  n)
inline

Definition at line 214 of file unordered_map.h.

◆ end() [4/4]

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
const_local_iterator mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::end ( size_type  n) const
inline

Definition at line 217 of file unordered_map.h.

◆ erase() [1/2]

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
void mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::erase ( const key_type key)
inline

Erases elements.

Definition at line 192 of file unordered_map.h.

◆ erase() [2/2]

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
iterator mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::erase ( const_iterator  it)
inline

Definition at line 193 of file unordered_map.h.

◆ find() [1/2]

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
template<typename ... Args>
iterator mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::find ( const Args &...  args)
inline
Returns
Element with the specified key.

Definition at line 207 of file unordered_map.h.

◆ find() [2/2]

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
template<typename ... Args>
const_iterator mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::find ( const Args &...  args) const
inline

Definition at line 210 of file unordered_map.h.

◆ get_allocator() [1/2]

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
const allocator_type & mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::get_allocator ( ) const
inlinenoexcept
Returns
A reference to the local node allocator.

Definition at line 125 of file unordered_map.h.

◆ get_allocator() [2/2]

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
allocator_type & mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::get_allocator ( )
inlinenoexcept

Definition at line 126 of file unordered_map.h.

◆ hash_function()

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
hasher mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::hash_function ( ) const
inline

Definition at line 242 of file unordered_map.h.

◆ insert() [1/2]

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
std::pair< iterator, bool > mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::insert ( const value_type pair)
inline

Inserts elements.

Definition at line 148 of file unordered_map.h.

◆ insert() [2/2]

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
std::pair< iterator, bool > mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::insert ( const_iterator  hint,
const value_type pair 
)
inline

Definition at line 150 of file unordered_map.h.

◆ insert_or_assign() [1/4]

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
template<typename M >
std::pair< iterator, bool > mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::insert_or_assign ( const Key &  k,
M &&  obj 
)
inline

Definition at line 183 of file unordered_map.h.

◆ insert_or_assign() [2/4]

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
template<typename M >
std::pair< iterator, bool > mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::insert_or_assign ( const_iterator  ,
const Key &  k,
M &&  obj 
)
inline

Definition at line 186 of file unordered_map.h.

◆ insert_or_assign() [3/4]

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
template<typename M >
std::pair< iterator, bool > mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::insert_or_assign ( const_iterator  ,
Key &&  k,
M &&  obj 
)
inline

Definition at line 189 of file unordered_map.h.

◆ insert_or_assign() [4/4]

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
template<typename M >
std::pair< iterator, bool > mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::insert_or_assign ( Key &&  k,
M &&  obj 
)
inline

Definition at line 168 of file unordered_map.h.

◆ key_eq()

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
key_equal mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::key_eq ( ) const
inline

Definition at line 243 of file unordered_map.h.

◆ load_factor()

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
float mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::load_factor ( ) const
inline

Definition at line 229 of file unordered_map.h.

◆ max_bucket_count()

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
size_type mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::max_bucket_count ( ) const
inlinenoexcept

Definition at line 224 of file unordered_map.h.

◆ max_load_factor() [1/2]

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
float mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::max_load_factor ( ) const
inline

Definition at line 230 of file unordered_map.h.

◆ max_load_factor() [2/2]

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
void mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::max_load_factor ( float  factor)
inline

Definition at line 231 of file unordered_map.h.

◆ max_size()

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
size_type mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::max_size ( ) const
inlinenoexcept

Definition at line 142 of file unordered_map.h.

◆ operator[]()

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
mapped_type & mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::operator[] ( const key_type key)

Provides access to the value associated with the given key, constructs a default value whenever the key was undefined.

◆ rehash()

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
void mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::rehash ( size_type  number_of_buckets)
inline

Resize the number buckets to at least number_of_buckets.

Definition at line 234 of file unordered_map.h.

◆ reserve()

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
void mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::reserve ( size_type  count)
inline

Resizes the set to the given number of elements.

Definition at line 240 of file unordered_map.h.

◆ size()

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
size_type mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::size ( ) const
inline
Returns
The number of elements.

Definition at line 141 of file unordered_map.h.

◆ try_emplace() [1/3]

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
template<typename ... Args>
std::pair< iterator, bool > mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::try_emplace ( const key_type key,
Args &&...  args 
)

◆ try_emplace() [2/3]

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
template<class... Args>
iterator mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::try_emplace ( const_iterator  ,
const Key &  k,
Args &&...  args 
)
inline

Definition at line 162 of file unordered_map.h.

◆ try_emplace() [3/3]

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
template<class... Args>
iterator mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::try_emplace ( const_iterator  ,
Key &&  k,
Args &&...  args 
)
inline

Definition at line 165 of file unordered_map.h.

Member Data Documentation

◆ allow_transparent

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
constexpr bool mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::allow_transparent = detail::is_transparent<Hash>() && detail::is_transparent<KeyEqual>()
staticconstexprprivate

True iff the hash and equals functions allow transparent lookup,.

Definition at line 49 of file unordered_map.h.

◆ m_set

template<typename Key , typename T , typename Hash , typename KeyEqual , typename Allocator , bool ThreadSafe, bool Resize>
Set mcrl2::utilities::unordered_map< Key, T, Hash, KeyEqual, Allocator, ThreadSafe, Resize >::m_set
private

The underlying set storing <key, value> pairs.

Definition at line 104 of file unordered_map.h.


The documentation for this class was generated from the following file: