Class unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>

#include <Geode/c++stl/gnustl/unordered_map.h>
template<class _Key,class _Tp,class _Hash = hash<_Key>,class _Pred = std::equal_to<_Key>,class _Alloc = std::allocator<std::pair<const _Key, _Tp> >>classunordered_multimap{ ... }

A standard container composed of equivalent keys (possibly containing multiple of each key value) that associates values of another type with the keys.

Template parameters

_Key

Type of key objects.

_Tp

Type of mapped objects.

_Hash

Hashing function object type, defaults to hash<_Value>.

_Pred

Predicate function object type, defaults to equal_to<_Value>.

_Alloc

Allocator type, defaults to std::allocator<std::pair<const _Key, _Tp>>. Meets the requirements of a <a href="tables.html#65">container</a>, and <a href="tables.html#xx">unordered associative container</a> The resulting value type of the container is std::pair<const _Key, _Tp>. Base is _Hashtable, dispatched at compile time via template alias __ummap_hashtable.
Examples0
Public static methods0
Public member functions50
template<typename _InputIterator>voidunordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>(,,,,,)

Builds an %unordered_multimap from a range.

Parameters

__first

An input iterator.

__last

An input iterator.

__n

Minimal initial number of buckets.

__hf

A hash functor.

__eql

A key equality functor.

__a

An allocator object. Create an %unordered_multimap consisting of copies of the elements from [__first,__last). This is linear in N (where N is distance(__first,__last)).
geode::stl::unordered_multimap&operator=()

/// Copy assignment operator.

geode::stl::unordered_multimap&operator=()

/// Move assignment operator.

geode::stl::unordered_multimap&operator=()

%Unordered_multimap list assignment operator.

Parameters

__l

An initializer_list. This function fills an %unordered_multimap with copies of the elements in the initializer list
geode::stl::unordered_multimap::allocator_typeget_allocator()const

/// Returns the allocator object with which the %unordered_multimap was /// constructed.

boolempty()const

/// Returns true if the %unordered_multimap is empty.

geode::stl::unordered_multimap::size_typesize()const

/// Returns the size of the %unordered_multimap.

geode::stl::unordered_multimap::size_typemax_size()const

/// Returns the maximum size of the %unordered_multimap.

geode::stl::unordered_multimap::iteratorbegin()

Returns a read/write iterator that points to the first element in the %unordered_multimap.

geode::stl::unordered_multimap::const_iteratorbegin()const

Returns a read-only (constant) iterator that points to the first element in the %unordered_multimap.

geode::stl::unordered_multimap::const_iteratorcbegin()const
No description provided
geode::stl::unordered_multimap::iteratorend()

Returns a read/write iterator that points one past the last element in the %unordered_multimap.

geode::stl::unordered_multimap::const_iteratorend()const

Returns a read-only (constant) iterator that points one past the last element in the %unordered_multimap.

geode::stl::unordered_multimap::const_iteratorcend()const
No description provided
template<typename... _Args>geode::stl::unordered_multimap::iteratoremplace()

Attempts to build and insert a std::pair into the %unordered_multimap.

Parameters

__args

Arguments used to generate a new pair instance (see std::piecewise_contruct for passing arguments to each part of the pair constructor).
Return value
An iterator that points to the inserted pair. This function attempts to build and insert a (key, value) %pair into the %unordered_multimap. Insertion requires amortized constant time.
template<typename... _Args>geode::stl::unordered_multimap::iteratoremplace_hint(,)

Attempts to build and insert a std::pair into the %unordered_multimap.

Parameters

__pos

An iterator that serves as a hint as to where the pair should be inserted.

__args

Arguments used to generate a new pair instance (see std::piecewise_contruct for passing arguments to each part of the pair constructor).
Return value
An iterator that points to the element with key of the std::pair built from
geode::stl::unordered_multimap::iteratorinsert()

Inserts a std::pair into the %unordered_multimap.

Parameters

__x

Pair to be inserted (see std::make_pair for easy creation of pairs).
Return value
An iterator that points to the inserted pair. Insertion requires amortized constant time.
template<typename _Pair,typename = typename std::enable_if<std::is_constructible<value_type, _Pair&&>::value>::type>geode::stl::unordered_multimap::iteratorinsert()
No description provided
geode::stl::unordered_multimap::iteratorinsert(,)

Inserts a std::pair into the %unordered_multimap.

Parameters

__hint

An iterator that serves as a hint as to where the pair should be inserted.

__x

Pair to be inserted (see std::make_pair for easy creation of pairs).
Return value
An iterator that points to the element with key of
template<typename _Pair,typename = typename std::enable_if<std::is_constructible<value_type, _Pair&&>::value>::type>geode::stl::unordered_multimap::iteratorinsert(,)
No description provided
template<typename _InputIterator>voidinsert(,)

A template function that attempts to insert a range of elements.

Parameters

__first

Iterator pointing to the start of the range to be inserted.

__last

Iterator pointing to the end of the range. Complexity similar to that of the range constructor.
voidinsert()

Attempts to insert a list of elements into the %unordered_multimap.

Parameters

__l

A std::initializer_list<value_type> of elements to be inserted. Complexity similar to that of the range constructor.
geode::stl::unordered_multimap::iteratorerase()

Erases an element from an %unordered_multimap.

Parameters

__position

An iterator pointing to the element to be erased.
Return value
An iterator pointing to the element immediately following
geode::stl::unordered_multimap::iteratorerase()
No description provided
geode::stl::unordered_multimap::size_typeerase()

Erases elements according to the provided key.

Parameters

__x

Key of elements to be erased.
Return value
The number of elements erased. This function erases all the elements located by the given key from an %unordered_multimap. Note that this function only erases the element, and that if the element is itself a pointer, the pointed-to memory is not touched in any way. Managing the pointer is the user's responsibility.
geode::stl::unordered_multimap::iteratorerase(,)

Erases a [__first,__last) range of elements from an %unordered_multimap.

Parameters

__first

Iterator pointing to the start of the range to be erased.

__last

Iterator pointing to the end of the range to be erased.
Return value
The iterator
voidclear()

Erases all elements in an %unordered_multimap. Note that this function only erases the elements, and that if the elements themselves are pointers, the pointed-to memory is not touched in any way. Managing the pointer is the user’s responsibility.

voidswap()

Swaps data with another %unordered_multimap.

Parameters

__x

An %unordered_multimap of the same element and allocator types. This exchanges the elements between two %unordered_multimap in constant time. Note that the global std::swap() function is specialized such that std::swap(m1,m2) will feed to this function.
geode::stl::unordered_multimap::hasherhash_function()const

/// Returns the hash functor object with which the %unordered_multimap /// was constructed.

geode::stl::unordered_multimap::key_equalkey_eq()const

/// Returns the key comparison object with which the %unordered_multimap /// was constructed.

geode::stl::unordered_multimap::iteratorfind()

Tries to locate an element in an %unordered_multimap.

Parameters

__x

Key to be located.
Return value
Iterator pointing to sought-after element, or end() if not found. This function takes a key and tries to locate the element with which the key matches. If successful the function returns an iterator pointing to the sought after element. If unsuccessful it returns the past-the-end (
geode::stl::unordered_multimap::const_iteratorfind()const
No description provided
geode::stl::unordered_multimap::size_typecount()const

Finds the number of elements.

Parameters

__x

Key to count.
Return value
Number of elements with specified key.
std::pair<geode::stl::unordered_multimap::iterator,geode::stl::unordered_multimap::iterator>equal_range()

Finds a subsequence matching given key.

Parameters

__x

Key to be located.
Return value
Pair of iterators that possibly points to the subsequence matching given key.
std::pair<geode::stl::unordered_multimap::const_iterator,geode::stl::unordered_multimap::const_iterator>equal_range()const
No description provided
geode::stl::unordered_multimap::size_typebucket_count()const

/// Returns the number of buckets of the %unordered_multimap.

geode::stl::unordered_multimap::size_typemax_bucket_count()const

/// Returns the maximum number of buckets of the %unordered_multimap.

geode::stl::unordered_multimap::size_typebucket_size()const
No description provided
geode::stl::unordered_multimap::size_typebucket()const
No description provided
geode::stl::unordered_multimap::local_iteratorbegin()

Returns a read/write iterator pointing to the first bucket element.

Parameters

__n

The bucket index.
Return value
A read/write local iterator.
geode::stl::unordered_multimap::const_local_iteratorbegin()const

Returns a read-only (constant) iterator pointing to the first bucket element.

Parameters

__n

The bucket index.
Return value
A read-only local iterator.
geode::stl::unordered_multimap::const_local_iteratorcbegin()const
No description provided
geode::stl::unordered_multimap::local_iteratorend()

Returns a read/write iterator pointing to one past the last bucket elements.

Parameters

__n

The bucket index.
Return value
A read/write local iterator.
geode::stl::unordered_multimap::const_local_iteratorend()const

Returns a read-only (constant) iterator pointing to one past the last bucket elements.

Parameters

__n

The bucket index.
Return value
A read-only local iterator.
geode::stl::unordered_multimap::const_local_iteratorcend()const
No description provided
floatload_factor()const

/// Returns the average number of elements per bucket.

floatmax_load_factor()const

/// Returns a positive number that the %unordered_multimap tries to keep /// the load factor less than or equal to.

voidmax_load_factor()

Change the %unordered_multimap maximum load factor.

Parameters

__z

The new maximum load factor.
voidrehash()

May rehash the %unordered_multimap.

Parameters

__n

The new number of buckets. Rehash will occur only if the new number of buckets respect the %unordered_multimap maximum load factor.
voidreserve()

Prepare the %unordered_multimap for a specified number of elements.

Parameters

__n

Number of elements required. Same as rehash(ceil(n / max_load_factor())).
Fields0
Protected member functions0
Protected fields0