Go to the documentation of this file.
24 #ifndef TSL_BHOPSCOTCH_MAP_H
25 #define TSL_BHOPSCOTCH_MAP_H
31 #include <initializer_list>
34 #include <type_traits>
53 template <
class Key,
class T,
class Hash = std::hash<Key>,
class KeyEqual = std::equal_to<Key>,
54 class Compare = std::less<Key>,
55 class Allocator = std::allocator<std::pair<const Key, T>>,
56 unsigned int NeighborhoodSize = 62,
bool StoreHash = false,
57 class GrowthPolicy = tsl::hh::power_of_two_growth_policy<2>>
71 return key_value.first;
84 return key_value.second;
95 KeyEqual, Allocator, NeighborhoodSize, StoreHash,
121 const KeyEqual & equal = KeyEqual(),
122 const Allocator &alloc = Allocator(),
const Compare &comp = Compare())
142 template <
class InputIt>
145 const Hash &hash = Hash(),
const KeyEqual &equal = KeyEqual(),
146 const Allocator &alloc = Allocator())
152 template <
class InputIt>
158 template <
class InputIt>
160 const Allocator &alloc)
167 const Hash &hash = Hash(),
const KeyEqual &equal = KeyEqual(),
168 const Allocator &alloc = Allocator())
174 const Allocator &alloc)
180 const Allocator &alloc)
222 template <class P, typename std::enable_if<std::is_constructible<value_type, P &&>::value>::type
224 std::pair<iterator, bool>
insert(P &&value)
236 template <class P, typename std::enable_if<std::is_constructible<value_type, P &&>::value>::type
240 return m_ht.
insert(hint, std::forward<P>(value));
248 template <
class InputIt>
void insert(InputIt first, InputIt last) {
m_ht.
insert(first, last); }
250 void insert(std::initializer_list<value_type> ilist)
281 template <
class... Args> std::pair<iterator, bool>
emplace(Args &&... args)
297 template <
class... Args>
308 template <
class... Args>
314 template <
class... Args>
317 return m_ht.
try_emplace(hint, std::move(k), std::forward<Args>(args)...);
332 return m_ht.
erase(key, precalculated_hash);
340 template <
class K,
class KE = KeyEqual,
class CP = Compare,
341 typename std::enable_if<has_is_transparent<KE>::value &&
342 has_is_transparent<CP>::value>::type * =
nullptr>
355 template <
class K,
class KE = KeyEqual,
class CP = Compare,
356 typename std::enable_if<has_is_transparent<KE>::value &&
357 has_is_transparent<CP>::value>::type * =
nullptr>
360 return m_ht.
erase(key, precalculated_hash);
375 T &
at(
const Key &key, std::size_t precalculated_hash)
377 return m_ht.
at(key, precalculated_hash);
380 const T &
at(
const Key &key)
const {
return m_ht.
at(key); }
385 const T &
at(
const Key &key, std::size_t precalculated_hash)
const
387 return m_ht.
at(key, precalculated_hash);
395 template <
class K,
class KE = KeyEqual,
class CP = Compare,
396 typename std::enable_if<has_is_transparent<KE>::value &&
397 has_is_transparent<CP>::value>::type * =
nullptr>
410 template <
class K,
class KE = KeyEqual,
class CP = Compare,
411 typename std::enable_if<has_is_transparent<KE>::value &&
412 has_is_transparent<CP>::value>::type * =
nullptr>
413 T &
at(
const K &key, std::size_t precalculated_hash)
415 return m_ht.
at(key, precalculated_hash);
421 template <
class K,
class KE = KeyEqual,
class CP = Compare,
422 typename std::enable_if<has_is_transparent<KE>::value &&
423 has_is_transparent<CP>::value>::type * =
nullptr>
424 const T &
at(
const K &key)
const
432 template <
class K,
class KE = KeyEqual,
class CP = Compare,
433 typename std::enable_if<has_is_transparent<KE>::value &&
434 has_is_transparent<CP>::value>::type * =
nullptr>
435 const T &
at(
const K &key, std::size_t precalculated_hash)
const
437 return m_ht.
at(key, precalculated_hash);
452 return m_ht.
count(key, precalculated_hash);
460 template <
class K,
class KE = KeyEqual,
class CP = Compare,
461 typename std::enable_if<has_is_transparent<KE>::value &&
462 has_is_transparent<CP>::value>::type * =
nullptr>
475 template <
class K,
class KE = KeyEqual,
class CP = Compare,
476 typename std::enable_if<has_is_transparent<KE>::value &&
477 has_is_transparent<CP>::value>::type * =
nullptr>
480 return m_ht.
count(key, precalculated_hash);
492 return m_ht.
find(key, precalculated_hash);
502 return m_ht.
find(key, precalculated_hash);
510 template <
class K,
class KE = KeyEqual,
class CP = Compare,
511 typename std::enable_if<has_is_transparent<KE>::value &&
512 has_is_transparent<CP>::value>::type * =
nullptr>
525 template <
class K,
class KE = KeyEqual,
class CP = Compare,
526 typename std::enable_if<has_is_transparent<KE>::value &&
527 has_is_transparent<CP>::value>::type * =
nullptr>
530 return m_ht.
find(key, precalculated_hash);
536 template <
class K,
class KE = KeyEqual,
class CP = Compare,
537 typename std::enable_if<has_is_transparent<KE>::value &&
538 has_is_transparent<CP>::value>::type * =
nullptr>
547 template <
class K,
class KE = KeyEqual,
class CP = Compare,
548 typename std::enable_if<has_is_transparent<KE>::value &&
549 has_is_transparent<CP>::value>::type * =
nullptr>
552 return m_ht.
find(key, precalculated_hash);
562 bool contains(
const Key &key, std::size_t precalculated_hash)
const
571 template <
class K,
class KE = KeyEqual,
572 typename std::enable_if<has_is_transparent<KE>::value>::type * =
nullptr>
585 template <
class K,
class KE = KeyEqual,
586 typename std::enable_if<has_is_transparent<KE>::value>::type * =
nullptr>
587 bool contains(
const K &key, std::size_t precalculated_hash)
const
599 std::pair<iterator, iterator>
equal_range(
const Key &key, std::size_t precalculated_hash)
604 std::pair<const_iterator, const_iterator>
equal_range(
const Key &key)
const
612 std::pair<const_iterator, const_iterator>
equal_range(
const Key & key,
613 std::size_t precalculated_hash)
const
623 template <
class K,
class KE = KeyEqual,
class CP = Compare,
624 typename std::enable_if<has_is_transparent<KE>::value &&
625 has_is_transparent<CP>::value>::type * =
nullptr>
638 template <
class K,
class KE = KeyEqual,
class CP = Compare,
639 typename std::enable_if<has_is_transparent<KE>::value &&
640 has_is_transparent<CP>::value>::type * =
nullptr>
641 std::pair<iterator, iterator>
equal_range(
const K &key, std::size_t precalculated_hash)
649 template <
class K,
class KE = KeyEqual,
class CP = Compare,
650 typename std::enable_if<has_is_transparent<KE>::value &&
651 has_is_transparent<CP>::value>::type * =
nullptr>
652 std::pair<const_iterator, const_iterator>
equal_range(
const K &key)
const
660 template <
class K,
class KE = KeyEqual,
class CP = Compare,
661 typename std::enable_if<has_is_transparent<KE>::value &&
662 has_is_transparent<CP>::value>::type * =
nullptr>
663 std::pair<const_iterator, const_iterator>
equal_range(
const K & key,
664 std::size_t precalculated_hash)
const
709 for (
const auto &element_lhs : lhs) {
710 const auto it_element_rhs = rhs.
find(element_lhs.first);
711 if (it_element_rhs == rhs.
cend() || element_lhs.second != it_element_rhs->second) {
734 template <
class Key,
class T,
class Hash = std::hash<Key>,
class KeyEqual = std::equal_to<Key>,
735 class Compare = std::less<Key>,
736 class Allocator = std::allocator<std::pair<const Key, T>>,
737 unsigned int NeighborhoodSize = 62,
bool StoreHash = false>
739 bhopscotch_map<Key, T, Hash, KeyEqual, Compare, Allocator, NeighborhoodSize, StoreHash,
size_type erase(const K &key, std::size_t precalculated_hash)
Definition: bhopscotch_map.h:358
const_iterator end() const noexcept
Definition: bhopscotch_map.h:205
std::pair< iterator, iterator > equal_range(const K &key)
Definition: hopscotch_hash.h:1087
float max_load_factor() const
Definition: hopscotch_hash.h:1147
Definition: bhopscotch_map.h:37
const T & at(const K &key) const
Definition: bhopscotch_map.h:424
const_iterator begin() const noexcept
Definition: bhopscotch_map.h:201
std::pair< iterator, bool > try_emplace(const key_type &k, Args &&... args)
Definition: hopscotch_hash.h:887
iterator insert(const_iterator hint, const value_type &value)
Definition: bhopscotch_map.h:231
typename ht::size_type size_type
Definition: bhopscotch_map.h:102
iterator insert(const_iterator hint, P &&value)
Definition: bhopscotch_map.h:238
friend bool operator==(const bhopscotch_map &lhs, const bhopscotch_map &rhs)
Definition: bhopscotch_map.h:703
typename ht::pointer pointer
Definition: bhopscotch_map.h:110
std::pair< const_iterator, const_iterator > equal_range(const Key &key, std::size_t precalculated_hash) const
Definition: bhopscotch_map.h:612
tsl::detail_hopscotch_hash::hopscotch_hash< std::pair< const Key, T >, KeySelect, ValueSelect, Hash, KeyEqual, Allocator, NeighborhoodSize, StoreHash, GrowthPolicy, overflow_container_type >::reference value_type & reference
Definition: hopscotch_hash.h:440
std::pair< const_iterator, const_iterator > equal_range(const K &key) const
Definition: bhopscotch_map.h:652
iterator erase(const_iterator pos)
Definition: bhopscotch_map.h:321
bool contains(const Key &key, std::size_t precalculated_hash) const
Definition: bhopscotch_map.h:562
typename ht::value_type value_type
Definition: bhopscotch_map.h:101
iterator erase(const_iterator first, const_iterator last)
Definition: bhopscotch_map.h:322
iterator mutable_iterator(const_iterator pos)
Definition: bhopscotch_map.h:699
T & at(const K &key, std::size_t precalculated_hash)
Definition: bhopscotch_map.h:413
typename ht::allocator_type allocator_type
Definition: bhopscotch_map.h:107
hasher hash_function() const
Definition: bhopscotch_map.h:688
std::pair< iterator, iterator > equal_range(const Key &key, std::size_t precalculated_hash)
Definition: bhopscotch_map.h:599
iterator find(const Key &key)
Definition: bhopscotch_map.h:483
std::pair< iterator, bool > insert(const value_type &value)
Definition: hopscotch_hash.h:786
void clear() noexcept
Definition: hopscotch_hash.h:776
void rehash(size_type count_)
Definition: hopscotch_hash.h:1156
tsl::detail_hopscotch_hash::hopscotch_hash< std::pair< const Key, T >, KeySelect, ValueSelect, Hash, KeyEqual, Allocator, NeighborhoodSize, StoreHash, GrowthPolicy, overflow_container_type >::allocator_type Allocator allocator_type
Definition: hopscotch_hash.h:439
const T & at(const Key &key) const
Definition: bhopscotch_map.h:380
struct anonymous_namespace{Ioss_SmartAssert.C}::assert_initializer init
T & at(const K &key)
Definition: bhopscotch_map.h:398
iterator find(const K &key, std::size_t precalculated_hash)
Definition: bhopscotch_map.h:528
Definition: bhopscotch_map.h:64
allocator_type get_allocator() const
Definition: hopscotch_hash.h:724
tsl::detail_hopscotch_hash::hopscotch_hash< std::pair< const Key, T >, KeySelect, ValueSelect, Hash, KeyEqual, Allocator, NeighborhoodSize, StoreHash, GrowthPolicy, overflow_container_type >::const_reference const value_type & const_reference
Definition: hopscotch_hash.h:441
tsl::detail_hopscotch_hash::hopscotch_hash< std::pair< const Key, T >, KeySelect, ValueSelect, Hash, KeyEqual, Allocator, NeighborhoodSize, StoreHash, GrowthPolicy, overflow_container_type >::hasher Hash hasher
Definition: hopscotch_hash.h:437
std::map< Key, T, Compare, Allocator > overflow_container_type
Definition: bhopscotch_map.h:92
iterator begin() noexcept
Definition: bhopscotch_map.h:200
key_compare key_comp() const
Definition: bhopscotch_map.h:690
size_type overflow_size() const noexcept
Definition: hopscotch_hash.h:1192
bool contains(const K &key) const
Definition: hopscotch_hash.h:1080
size_type size() const noexcept
Definition: bhopscotch_map.h:212
tsl::detail_hopscotch_hash::hopscotch_hash< std::pair< const Key, T >, KeySelect, ValueSelect, Hash, KeyEqual, Allocator, NeighborhoodSize, StoreHash, GrowthPolicy, overflow_container_type >::key_type typename KeySelect::key_type key_type
Definition: hopscotch_hash.h:433
typename ht::const_pointer const_pointer
Definition: bhopscotch_map.h:111
size_type erase(const K &key)
Definition: bhopscotch_map.h:343
size_type erase(const key_type &key)
Definition: bhopscotch_map.h:323
const_iterator find(const Key &key, std::size_t precalculated_hash) const
Definition: bhopscotch_map.h:500
size_type erase(const key_type &key, std::size_t precalculated_hash)
Definition: bhopscotch_map.h:330
std::pair< const_iterator, const_iterator > equal_range(const Key &key) const
Definition: bhopscotch_map.h:604
iterator insert_or_assign(const_iterator hint, key_type &&k, M &&obj)
Definition: bhopscotch_map.h:270
bhopscotch_map(std::initializer_list< value_type > init, size_type bucket_count, const Allocator &alloc)
Definition: bhopscotch_map.h:173
typename ht::difference_type difference_type
Definition: bhopscotch_map.h:103
hasher hash_function() const
Definition: hopscotch_hash.h:1170
float load_factor() const
Definition: hopscotch_hash.h:1138
size_type count(const Key &key, std::size_t precalculated_hash) const
Definition: bhopscotch_map.h:450
friend bool operator!=(const bhopscotch_map &lhs, const bhopscotch_map &rhs)
Definition: bhopscotch_map.h:719
std::pair< iterator, bool > emplace(Args &&... args)
Definition: hopscotch_hash.h:876
size_type count(const Key &key) const
Definition: bhopscotch_map.h:443
T & operator[](Key &&key)
Definition: bhopscotch_map.h:441
typename ht::const_iterator const_iterator
Definition: bhopscotch_map.h:113
tsl::detail_hopscotch_hash::hopscotch_hash< std::pair< const Key, T >, KeySelect, ValueSelect, Hash, KeyEqual, Allocator, NeighborhoodSize, StoreHash, GrowthPolicy, overflow_container_type >::difference_type std::ptrdiff_t difference_type
Definition: hopscotch_hash.h:436
tsl::detail_hopscotch_hash::hopscotch_hash< std::pair< const Key, T >, KeySelect, ValueSelect, Hash, KeyEqual, Allocator, NeighborhoodSize, StoreHash, GrowthPolicy, overflow_container_type >::DEFAULT_INIT_BUCKETS_SIZE static const size_type DEFAULT_INIT_BUCKETS_SIZE
Definition: hopscotch_hash.h:1763
iterator insert(const_iterator hint, value_type &&value)
Definition: bhopscotch_map.h:243
std::pair< iterator, bool > insert(value_type &&value)
Definition: bhopscotch_map.h:229
U::key_compare key_comp() const
Definition: hopscotch_hash.h:1196
size_type max_size() const noexcept
Definition: hopscotch_hash.h:771
std::pair< iterator, iterator > equal_range(const K &key)
Definition: bhopscotch_map.h:626
tsl::detail_hopscotch_hash::hopscotch_hash< std::pair< const Key, T >, KeySelect, ValueSelect, Hash, KeyEqual, Allocator, NeighborhoodSize, StoreHash, GrowthPolicy, overflow_container_type >::value_type std::pair< const Key, T > value_type
Definition: hopscotch_hash.h:434
std::pair< iterator, bool > insert_or_assign(key_type &&k, M &&obj)
Definition: bhopscotch_map.h:260
const value_type & operator()(const std::pair< const Key, T > &key_value) const
Definition: bhopscotch_map.h:82
void swap(bhopscotch_map &other)
Definition: bhopscotch_map.h:363
std::pair< const_iterator, const_iterator > equal_range(const K &key, std::size_t precalculated_hash) const
Definition: bhopscotch_map.h:663
T mapped_type
Definition: bhopscotch_map.h:100
iterator find(const K &key)
Definition: bhopscotch_map.h:513
bhopscotch_map(InputIt first, InputIt last, size_type bucket_count=ht::DEFAULT_INIT_BUCKETS_SIZE, const Hash &hash=Hash(), const KeyEqual &equal=KeyEqual(), const Allocator &alloc=Allocator())
Definition: bhopscotch_map.h:143
bhopscotch_map()
Definition: bhopscotch_map.h:118
iterator end() noexcept
Definition: hopscotch_hash.h:751
size_type size() const noexcept
Definition: hopscotch_hash.h:769
iterator find(const Key &key, std::size_t precalculated_hash)
Definition: bhopscotch_map.h:490
bool contains(const K &key, std::size_t precalculated_hash) const
Definition: bhopscotch_map.h:587
tsl::detail_hopscotch_hash::hopscotch_hash< std::pair< const Key, T >, KeySelect, ValueSelect, Hash, KeyEqual, Allocator, NeighborhoodSize, StoreHash, GrowthPolicy, overflow_container_type >::key_equal KeyEqual key_equal
Definition: hopscotch_hash.h:438
void reserve(size_type count_)
Definition: hopscotch_hash.h:1162
tsl::detail_hopscotch_hash::hopscotch_hash< std::pair< const Key, T >, KeySelect, ValueSelect, Hash, KeyEqual, Allocator, NeighborhoodSize, StoreHash, GrowthPolicy, overflow_container_type >::size_type std::size_t size_type
Definition: hopscotch_hash.h:435
const_iterator find(const Key &key) const
Definition: bhopscotch_map.h:495
bool empty() const noexcept
Definition: bhopscotch_map.h:211
size_type bucket_count() const
Definition: bhopscotch_map.h:672
tsl::detail_hopscotch_hash::hopscotch_hash< std::pair< const Key, T >, KeySelect, ValueSelect, Hash, KeyEqual, Allocator, NeighborhoodSize, StoreHash, GrowthPolicy, overflow_container_type >::const_iterator hopscotch_iterator< true > const_iterator
Definition: hopscotch_hash.h:445
void insert(InputIt first, InputIt last)
Definition: bhopscotch_map.h:248
iterator begin() noexcept
Definition: hopscotch_hash.h:729
size_type max_bucket_count() const
Definition: bhopscotch_map.h:673
bhopscotch_map(std::initializer_list< value_type > init, size_type bucket_count, const Hash &hash, const Allocator &alloc)
Definition: bhopscotch_map.h:179
Compare key_compare
Definition: bhopscotch_map.h:106
key_equal key_eq() const
Definition: bhopscotch_map.h:689
bhopscotch_map(size_type bucket_count, const Hash &hash, const Allocator &alloc)
Definition: bhopscotch_map.h:132
iterator insert_or_assign(const_iterator hint, const key_type &k, M &&obj)
Definition: bhopscotch_map.h:265
std::pair< iterator, bool > insert_or_assign(const key_type &k, M &&obj)
Definition: hopscotch_hash.h:842
iterator erase(iterator pos)
Definition: hopscotch_hash.h:921
void insert(std::initializer_list< value_type > ilist)
Definition: bhopscotch_map.h:250
iterator find(const K &key)
Definition: hopscotch_hash.h:1063
bhopscotch_map(size_type bucket_count, const Allocator &alloc)
Definition: bhopscotch_map.h:127
size_type count(const K &key) const
Definition: bhopscotch_map.h:463
std::pair< iterator, bool > insert_or_assign(const key_type &k, M &&obj)
Definition: bhopscotch_map.h:255
tsl::detail_hopscotch_hash::hopscotch_hash< std::pair< const Key, T >, KeySelect, ValueSelect, Hash, KeyEqual, Allocator, NeighborhoodSize, StoreHash, GrowthPolicy, overflow_container_type >::const_pointer const value_type * const_pointer
Definition: hopscotch_hash.h:443
const_iterator cbegin() const noexcept
Definition: bhopscotch_map.h:202
tsl::detail_hopscotch_hash::hopscotch_hash< std::pair< const Key, T >, KeySelect, ValueSelect, Hash, KeyEqual, Allocator, NeighborhoodSize, StoreHash, GrowthPolicy, overflow_container_type >::pointer value_type * pointer
Definition: hopscotch_hash.h:442
std::pair< iterator, bool > insert(const value_type &value)
Definition: bhopscotch_map.h:220
value_type & operator()(std::pair< Key, T > &key_value)
Definition: bhopscotch_map.h:87
iterator emplace_hint(const_iterator hint, Args &&... args)
Definition: hopscotch_hash.h:881
const_iterator cend() const noexcept
Definition: bhopscotch_map.h:206
const_iterator cbegin() const noexcept
Definition: hopscotch_hash.h:741
const key_type & operator()(const std::pair< const Key, T > &key_value) const
Definition: bhopscotch_map.h:69
key_equal key_eq() const
Definition: hopscotch_hash.h:1172
ht m_ht
Definition: bhopscotch_map.h:727
float load_factor() const
Definition: bhopscotch_map.h:678
Definition: hopscotch_hash.h:69
typename ht::reference reference
Definition: bhopscotch_map.h:108
iterator try_emplace(const_iterator hint, const key_type &k, Args &&... args)
Definition: bhopscotch_map.h:309
typename ht::hasher hasher
Definition: bhopscotch_map.h:104
tsl::detail_hopscotch_hash::hopscotch_hash< std::pair< const Key, T >, KeySelect, ValueSelect, Hash, KeyEqual, Allocator, NeighborhoodSize, StoreHash, GrowthPolicy, overflow_container_type >::iterator hopscotch_iterator< false > iterator
Definition: hopscotch_hash.h:444
Definition: bhopscotch_map.h:77
const key_type & operator()(std::pair< const Key, T > &key_value)
Definition: bhopscotch_map.h:74
const_iterator find(const K &key) const
Definition: bhopscotch_map.h:539
iterator end() noexcept
Definition: bhopscotch_map.h:204
const_iterator find(const K &key, std::size_t precalculated_hash) const
Definition: bhopscotch_map.h:550
size_type count(const K &key, std::size_t precalculated_hash) const
Definition: bhopscotch_map.h:478
void swap(hopscotch_hash &other)
Definition: hopscotch_hash.h:980
void clear() noexcept
Definition: bhopscotch_map.h:218
bool empty() const noexcept
Definition: hopscotch_hash.h:767
std::pair< iterator, bool > try_emplace(key_type &&k, Args &&... args)
Definition: bhopscotch_map.h:303
iterator try_emplace(const_iterator hint, key_type &&k, Args &&... args)
Definition: bhopscotch_map.h:315
friend void swap(bhopscotch_map &lhs, bhopscotch_map &rhs)
Definition: bhopscotch_map.h:724
Key key_type
Definition: bhopscotch_map.h:67
size_type count(const K &key) const
Definition: hopscotch_hash.h:1056
std::pair< iterator, iterator > equal_range(const Key &key)
Definition: bhopscotch_map.h:592
Definition: bhopscotch_map.h:58
float max_load_factor() const
Definition: bhopscotch_map.h:679
bhopscotch_map(InputIt first, InputIt last, size_type bucket_count, const Allocator &alloc)
Definition: bhopscotch_map.h:153
T value_type
Definition: bhopscotch_map.h:80
bhopscotch_map(const Allocator &alloc)
Definition: bhopscotch_map.h:137
tsl::detail_hopscotch_hash::hopscotch_hash< std::pair< const Key, T >, KeySelect, ValueSelect, Hash, KeyEqual, Allocator, NeighborhoodSize, StoreHash, GrowthPolicy, overflow_container_type >
bhopscotch_map(size_type bucket_count, const Hash &hash=Hash(), const KeyEqual &equal=KeyEqual(), const Allocator &alloc=Allocator(), const Compare &comp=Compare())
Definition: bhopscotch_map.h:120
bool contains(const Key &key) const
Definition: bhopscotch_map.h:555
const T & at(const Key &key, std::size_t precalculated_hash) const
Definition: bhopscotch_map.h:385
T & at(const Key &key)
Definition: bhopscotch_map.h:368
iterator emplace_hint(const_iterator hint, Args &&... args)
Definition: bhopscotch_map.h:292
const_iterator cend() const noexcept
Definition: hopscotch_hash.h:758
void rehash(size_type count_)
Definition: bhopscotch_map.h:682
size_type max_bucket_count() const
Definition: hopscotch_hash.h:1128
U::value_type & at(const K &key)
Definition: hopscotch_hash.h:1001
iterator erase(iterator pos)
Definition: bhopscotch_map.h:320
T & operator[](const Key &key)
Definition: bhopscotch_map.h:440
typename ht::iterator iterator
Definition: bhopscotch_map.h:112
size_type max_size() const noexcept
Definition: bhopscotch_map.h:213
typename ht::key_type key_type
Definition: bhopscotch_map.h:99
allocator_type get_allocator() const
Definition: bhopscotch_map.h:195
bhopscotch_map & operator=(std::initializer_list< value_type > ilist)
Definition: bhopscotch_map.h:185
std::pair< iterator, bool > emplace(Args &&... args)
Definition: bhopscotch_map.h:281
typename ht::key_equal key_equal
Definition: bhopscotch_map.h:105
std::pair< iterator, bool > insert(P &&value)
Definition: bhopscotch_map.h:224
T & at(const Key &key, std::size_t precalculated_hash)
Definition: bhopscotch_map.h:375
bool contains(const K &key) const
Definition: bhopscotch_map.h:573
void max_load_factor(float ml)
Definition: bhopscotch_map.h:680
const T & at(const K &key, std::size_t precalculated_hash) const
Definition: bhopscotch_map.h:435
void reserve(size_type count_)
Definition: bhopscotch_map.h:683
bhopscotch_map(InputIt first, InputIt last, size_type bucket_count, const Hash &hash, const Allocator &alloc)
Definition: bhopscotch_map.h:159
size_type overflow_size() const noexcept
Definition: bhopscotch_map.h:701
size_type bucket_count() const
Definition: hopscotch_hash.h:1114
iterator mutable_iterator(const_iterator pos)
Definition: hopscotch_hash.h:1177
typename ht::const_reference const_reference
Definition: bhopscotch_map.h:109
bhopscotch_map(std::initializer_list< value_type > init, size_type bucket_count=ht::DEFAULT_INIT_BUCKETS_SIZE, const Hash &hash=Hash(), const KeyEqual &equal=KeyEqual(), const Allocator &alloc=Allocator())
Definition: bhopscotch_map.h:165
std::pair< iterator, bool > try_emplace(const key_type &k, Args &&... args)
Definition: bhopscotch_map.h:298
Definition: hopscotch_growth_policy.h:250
std::pair< iterator, iterator > equal_range(const K &key, std::size_t precalculated_hash)
Definition: bhopscotch_map.h:641