momo  3.12
momo::stdish::unordered_multimap_open< TKey, TMapped, THasher, TEqualComparer, TAllocator > Class Template Reference

momo::stdish::unordered_multimap_open is similar to std::unordered_multimap, but much more efficient in operation speed. The implementation is based on open addressing hash table. More...

#include <unordered_multimap.h>

Inheritance diagram for momo::stdish::unordered_multimap_open< TKey, TMapped, THasher, TEqualComparer, TAllocator >:

Public Member Functions

unordered_multimap_openoperator= (std::initializer_list< typename UnorderedMultiMapAdaptor::value_type > values)
 

Friends

void swap (unordered_multimap_open &left, unordered_multimap_open &right) noexcept
 

Detailed Description

template<typename TKey, typename TMapped, typename THasher = HashCoder<TKey>, typename TEqualComparer = std::equal_to<TKey>, typename TAllocator = std::allocator<std::pair<const TKey, TMapped>>>
class momo::stdish::unordered_multimap_open< TKey, TMapped, THasher, TEqualComparer, TAllocator >

momo::stdish::unordered_multimap_open is similar to std::unordered_multimap, but much more efficient in operation speed. The implementation is based on open addressing hash table.

Deviations from the std::unordered_multimap:

  1. Each of duplicate keys stored only once.
  2. max_load_factor, rehash, reserve, load_factor and all the functions, associated with buckets or nodes, are not implemented.
  3. Container items must be movable (preferably without exceptions) or copyable, similar to items of std::vector.
  4. After each addition or removal of the item all iterators and references to items become invalid and should not be used.
  5. Type reference is not the same as value_type&, so for (auto& p : map) is illegal, but for (auto p : map) or for (const auto& p : map) or for (auto&& p : map) is allowed.
  6. Functions clear, begin, cbegin and iterator increment take O(bucket_count) time in worst case.
  7. Functions erase can throw exceptions thrown by key_type and mapped_type move assignment operators.

It is allowed to pass to functions insert and emplace references to items within the container. But in case of the function insert, receiving pair of iterators, it's not allowed to pass iterators pointing to the items within the container.

Member Function Documentation

◆ operator=()

template<typename TKey , typename TMapped , typename THasher = HashCoder<TKey>, typename TEqualComparer = std::equal_to<TKey>, typename TAllocator = std::allocator<std::pair<const TKey, TMapped>>>
unordered_multimap_open& momo::stdish::unordered_multimap_open< TKey, TMapped, THasher, TEqualComparer, TAllocator >::operator= ( std::initializer_list< typename UnorderedMultiMapAdaptor::value_type values)
inline

Friends And Related Function Documentation

◆ swap

template<typename TKey , typename TMapped , typename THasher = HashCoder<TKey>, typename TEqualComparer = std::equal_to<TKey>, typename TAllocator = std::allocator<std::pair<const TKey, TMapped>>>
void swap ( unordered_multimap_open< TKey, TMapped, THasher, TEqualComparer, TAllocator > &  left,
unordered_multimap_open< TKey, TMapped, THasher, TEqualComparer, TAllocator > &  right 
)
friend

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