|
| | unordered_set () |
| |
| | unordered_set (const allocator_type &alloc) |
| |
| | unordered_set (size_type bucketCount, const allocator_type &alloc=allocator_type()) |
| |
| | unordered_set (size_type bucketCount, const hasher &hashFunc, const allocator_type &alloc=allocator_type()) |
| |
| | unordered_set (size_type bucketCount, const hasher &hashFunc, const key_equal &equalComp, const allocator_type &alloc=allocator_type()) |
| |
| template<typename Iterator > |
| | unordered_set (Iterator first, Iterator last) |
| |
| template<typename Iterator > |
| | unordered_set (Iterator first, Iterator last, size_type bucketCount, const allocator_type &alloc=allocator_type()) |
| |
| template<typename Iterator > |
| | unordered_set (Iterator first, Iterator last, size_type bucketCount, const hasher &hashFunc, const allocator_type &alloc=allocator_type()) |
| |
| template<typename Iterator > |
| | unordered_set (Iterator first, Iterator last, size_type bucketCount, const hasher &hashFunc, const key_equal &equalComp, const allocator_type &alloc=allocator_type()) |
| |
| | unordered_set (std::initializer_list< momo::internal::Identity< value_type >> values) |
| |
| | unordered_set (std::initializer_list< momo::internal::Identity< value_type >> values, size_type bucketCount, const allocator_type &alloc=allocator_type()) |
| |
| | unordered_set (std::initializer_list< momo::internal::Identity< value_type >> values, size_type bucketCount, const hasher &hashFunc, const allocator_type &alloc=allocator_type()) |
| |
| | unordered_set (std::initializer_list< momo::internal::Identity< value_type >> values, size_type bucketCount, const hasher &hashFunc, const key_equal &equalComp, const allocator_type &alloc=allocator_type()) |
| |
| | unordered_set (unordered_set &&right) |
| |
| | unordered_set (unordered_set &&right, const momo::internal::Identity< allocator_type > &alloc) |
| |
| | unordered_set (const unordered_set &right) |
| |
| | unordered_set (const unordered_set &right, const momo::internal::Identity< allocator_type > &alloc) |
| |
| | ~unordered_set ()=default |
| |
| unordered_set & | operator= (unordered_set &&right) noexcept(momo::internal::ContainerAssignerStd::IsNothrowMoveAssignable< unordered_set >::value) |
| |
| unordered_set & | operator= (const unordered_set &right) |
| |
| unordered_set & | operator= (std::initializer_list< value_type > values) |
| |
| void | swap (unordered_set &right) noexcept |
| |
| const nested_container_type & | get_nested_container () const noexcept |
| |
| nested_container_type & | get_nested_container () noexcept |
| |
| const_iterator | begin () const noexcept |
| |
| const_iterator | end () const noexcept |
| |
| const_iterator | cbegin () const noexcept |
| |
| const_iterator | cend () const noexcept |
| |
| float | max_load_factor () const noexcept |
| |
| void | max_load_factor (float maxLoadFactor) |
| |
| hasher | hash_function () const |
| |
| key_equal | key_eq () const |
| |
| allocator_type | get_allocator () const noexcept |
| |
| size_type | max_size () const noexcept |
| |
| size_type | size () const noexcept |
| |
| MOMO_NODISCARD bool | empty () const noexcept |
| |
| void | clear () noexcept |
| |
| void | rehash (size_type bucketCount) |
| |
| void | reserve (size_type count) |
| |
| MOMO_FORCEINLINE const_iterator | find (const key_type &key) const |
| |
| template<typename KeyArg > |
| MOMO_FORCEINLINE momo::internal::EnableIf< IsValidKeyArg< KeyArg >::value, const_iterator > | find (const KeyArg &key) const |
| |
| MOMO_FORCEINLINE size_type | count (const key_type &key) const |
| |
| template<typename KeyArg > |
| MOMO_FORCEINLINE momo::internal::EnableIf< IsValidKeyArg< KeyArg >::value, size_type > | count (const KeyArg &key) const |
| |
| MOMO_FORCEINLINE bool | contains (const key_type &key) const |
| |
| template<typename KeyArg > |
| MOMO_FORCEINLINE momo::internal::EnableIf< IsValidKeyArg< KeyArg >::value, bool > | contains (const KeyArg &key) const |
| |
| MOMO_FORCEINLINE std::pair< const_iterator, const_iterator > | equal_range (const key_type &key) const |
| |
| template<typename KeyArg > |
| MOMO_FORCEINLINE momo::internal::EnableIf< IsValidKeyArg< KeyArg >::value, std::pair< const_iterator, const_iterator > > | equal_range (const KeyArg &key) const |
| |
| std::pair< iterator, bool > | insert (value_type &&value) |
| |
| iterator | insert (const_iterator hint, value_type &&value) |
| |
| std::pair< iterator, bool > | insert (const value_type &value) |
| |
| iterator | insert (const_iterator hint, const value_type &value) |
| |
| insert_return_type | insert (node_type &&node) |
| |
| iterator | insert (const_iterator hint, node_type &&node) |
| |
| template<typename Iterator > |
| void | insert (Iterator first, Iterator last) |
| |
| void | insert (std::initializer_list< value_type > values) |
| |
| template<typename... ValueArgs> |
| std::pair< iterator, bool > | emplace (ValueArgs &&... valueArgs) |
| |
| template<typename ValueArg > |
| momo::internal::EnableIf< std::is_same< key_type, typename std::decay< ValueArg >::type >::value, std::pair< iterator, bool > > | emplace (ValueArg &&valueArg) |
| |
| template<typename... ValueArgs> |
| iterator | emplace_hint (const_iterator hint, ValueArgs &&... valueArgs) |
| |
| iterator | erase (const_iterator where) |
| |
| iterator | erase (const_iterator first, const_iterator last) |
| |
| size_type | erase (const key_type &key) |
| |
| node_type | extract (const_iterator where) |
| |
| node_type | extract (const key_type &key) |
| |
| template<typename Set > |
| void | merge (Set &&set) |
| |
| size_type | max_bucket_count () const noexcept |
| |
| size_type | bucket_count () const noexcept |
| |
| size_type | bucket_size (size_type bucketIndex) const |
| |
| local_iterator | begin (size_type bucketIndex) |
| |
| const_local_iterator | begin (size_type bucketIndex) const |
| |
| local_iterator | end (size_type bucketIndex) |
| |
| const_local_iterator | end (size_type bucketIndex) const |
| |
| const_local_iterator | cbegin (size_type bucketIndex) const |
| |
| const_local_iterator | cend (size_type bucketIndex) const |
| |
| size_type | bucket (const key_type &key) const |
| |
| float | load_factor () const noexcept |
| |
template<typename TKey, typename THasher = HashCoder<TKey>, typename TEqualComparer = std::equal_to<TKey>, typename TAllocator = std::allocator<TKey>, typename THashSet = HashSet<TKey, HashTraitsStd<TKey, THasher, TEqualComparer>, MemManagerStd<TAllocator>>>
class momo::stdish::unordered_set< TKey, THasher, TEqualComparer, TAllocator, THashSet >
momo::stdish::unordered_set is similar to std::unordered_set, but much more efficient in memory usage. The implementation is based on hash table with buckets in the form of small arrays.
Deviations from the std::unordered_set:
- Container items must be movable (preferably without exceptions) or copyable, similar to items of
std::vector.
- After each addition or removal of the item all iterators and references to items become invalid and should not be used.
- Functions
clear, begin, cbegin and iterator increment take O(bucket_count) time in worst case.
- If
ObjectManager<key_type>::isNothrowAnywayAssignable is false, functions erase can throw exceptions.
- Functions
merge, extract and insert(node_type&&) move items.
It is allowed to pass to functions insert and emplace references to items within the container.