Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
iunordered_multiset< TKey, THash, TKeyEqual > Class Template Reference
[unordered_multiset]
The base class for specifically sized unordered_multiset. More...
#include <unordered_multiset.h>
Inherited by unordered_multiset< TKey, MAX_SIZE_, MAX_BUCKETS_, THash, TKeyEqual >.
Public Member Functions | |
iterator | begin () |
Returns an iterator to the beginning of the unordered_multiset. | |
const_iterator | begin () const |
Returns a const_iterator to the beginning of the unordered_multiset. | |
const_iterator | cbegin () const |
Returns a const_iterator to the beginning of the unordered_multiset. | |
local_iterator | begin (size_t i) |
Returns an iterator to the beginning of the unordered_multiset bucket. | |
local_const_iterator | begin (size_t i) const |
Returns a const_iterator to the beginning of the unordered_multiset bucket. | |
local_const_iterator | cbegin (size_t i) const |
Returns a const_iterator to the beginning of the unordered_multiset bucket. | |
iterator | end () |
Returns an iterator to the end of the unordered_multiset. | |
const_iterator | end () const |
Returns a const_iterator to the end of the unordered_multiset. | |
const_iterator | cend () const |
Returns a const_iterator to the end of the unordered_multiset. | |
local_iterator | end (size_t i) |
Returns an iterator to the end of the unordered_multiset bucket. | |
local_const_iterator | end (size_t i) const |
Returns a const_iterator to the end of the unordered_multiset bucket. | |
local_const_iterator | cend (size_t i) const |
Returns a const_iterator to the end of the unordered_multiset bucket. | |
size_type | get_bucket_index (key_parameter_t key) const |
Returns the bucket index for the key. | |
size_type | bucket_size (key_parameter_t key) const |
Returns the size of the bucket key. | |
size_type | max_bucket_count () const |
Returns the maximum number of the buckets the container can hold. | |
size_type | bucket_count () const |
Returns the number of the buckets the container holds. | |
template<typename TIterator > | |
void | assign (TIterator first_, TIterator last_) |
Assigns values to the unordered_multiset. | |
std::pair< iterator, bool > | insert (const value_type &key) |
Inserts a value to the unordered_multiset. | |
iterator | insert (const_iterator position, const value_type &key) |
Inserts a value to the unordered_multiset. | |
template<class TIterator > | |
void | insert (TIterator first_, TIterator last_) |
Inserts a range of values to the unordered_multiset. | |
size_t | erase (key_parameter_t key) |
Erases an element. | |
iterator | erase (const_iterator ielement) |
Erases an element. | |
iterator | erase (const_iterator first_, const_iterator last_) |
Erases a range of elements. | |
void | clear () |
Clears the unordered_multiset. | |
size_t | count (key_parameter_t key) const |
Counts an element. | |
iterator | find (key_parameter_t key) |
Finds an element. | |
const_iterator | find (key_parameter_t key) const |
Finds an element. | |
std::pair< iterator, iterator > | equal_range (key_parameter_t key) |
Returns a range containing all elements with key key in the container. | |
std::pair< const_iterator, const_iterator > | equal_range (key_parameter_t key) const |
Returns a range containing all elements with key key in the container. | |
size_type | size () const |
Gets the size of the unordered_multiset. | |
size_type | max_size () const |
Gets the maximum possible size of the unordered_multiset. | |
bool | empty () const |
Checks to see if the unordered_multiset is empty. | |
bool | full () const |
Checks to see if the unordered_multiset is full. | |
size_t | available () const |
Returns the remaining capacity. | |
float | load_factor () const |
Returns the load factor = size / bucket_count. | |
hasher | hash_function () const |
Returns the function that hashes the keys. | |
key_equal | key_eq () const |
Returns the function that compares the keys. | |
iunordered_multiset & | operator= (const iunordered_multiset &rhs) |
Assignment operator. | |
Protected Member Functions | |
iunordered_multiset (pool_t &node_pool_, bucket_t *pbuckets_, size_t number_of_buckets_) | |
Constructor. | |
void | initialise () |
Initialise the unordered_multiset. |
Detailed Description
template<typename TKey, typename THash = etl::hash<TKey>, typename TKeyEqual = std::equal_to<TKey>>
class etl::iunordered_multiset< TKey, THash, TKeyEqual >
The base class for specifically sized unordered_multiset.
Can be used as a reference type for all unordered_multiset containing a specific type.
Definition at line 126 of file unordered_multiset.h.
Constructor & Destructor Documentation
iunordered_multiset | ( | pool_t & | node_pool_, |
bucket_t * | pbuckets_, | ||
size_t | number_of_buckets_ | ||
) | [protected] |
Constructor.
Definition at line 1104 of file unordered_multiset.h.
Member Function Documentation
void assign | ( | TIterator | first_, |
TIterator | last_ | ||
) |
Assigns values to the unordered_multiset.
If asserts or exceptions are enabled, emits unordered_multiset_full if the unordered_multiset does not have enough free space. If asserts or exceptions are enabled, emits unordered_multiset_iterator if the iterators are reversed.
- Parameters:
-
first The iterator to the first element. last The iterator to the last element + 1.
Definition at line 632 of file unordered_multiset.h.
size_t available | ( | ) | const |
Returns the remaining capacity.
- Returns:
- The remaining capacity.
Definition at line 1053 of file unordered_multiset.h.
iterator begin | ( | ) |
Returns an iterator to the beginning of the unordered_multiset.
- Returns:
- An iterator to the beginning of the unordered_multiset.
Definition at line 482 of file unordered_multiset.h.
const_iterator begin | ( | ) | const |
Returns a const_iterator to the beginning of the unordered_multiset.
- Returns:
- A const iterator to the beginning of the unordered_multiset.
Definition at line 491 of file unordered_multiset.h.
local_iterator begin | ( | size_t | i ) |
Returns an iterator to the beginning of the unordered_multiset bucket.
- Returns:
- An iterator to the beginning of the unordered_multiset bucket.
Definition at line 509 of file unordered_multiset.h.
local_const_iterator begin | ( | size_t | i ) | const |
Returns a const_iterator to the beginning of the unordered_multiset bucket.
- Returns:
- A const iterator to the beginning of the unordered_multiset bucket.
Definition at line 518 of file unordered_multiset.h.
size_type bucket_count | ( | ) | const |
Returns the number of the buckets the container holds.
- Returns:
- The number of the buckets the container holds.
Definition at line 619 of file unordered_multiset.h.
size_type bucket_size | ( | key_parameter_t | key ) | const |
Returns the size of the bucket key.
- Returns:
- The bucket size of the bucket key.
Definition at line 599 of file unordered_multiset.h.
local_const_iterator cbegin | ( | size_t | i ) | const |
Returns a const_iterator to the beginning of the unordered_multiset bucket.
- Returns:
- A const iterator to the beginning of the unordered_multiset bucket.
Definition at line 527 of file unordered_multiset.h.
const_iterator cbegin | ( | ) | const |
Returns a const_iterator to the beginning of the unordered_multiset.
- Returns:
- A const iterator to the beginning of the unordered_multiset.
Definition at line 500 of file unordered_multiset.h.
const_iterator cend | ( | ) | const |
Returns a const_iterator to the end of the unordered_multiset.
- Returns:
- A const iterator to the end of the unordered_multiset.
Definition at line 554 of file unordered_multiset.h.
local_const_iterator cend | ( | size_t | i ) | const |
Returns a const_iterator to the end of the unordered_multiset bucket.
- Returns:
- A const iterator to the end of the unordered_multiset bucket.
Definition at line 581 of file unordered_multiset.h.
void clear | ( | ) |
Clears the unordered_multiset.
Definition at line 866 of file unordered_multiset.h.
size_t count | ( | key_parameter_t | key ) | const |
Counts an element.
- Parameters:
-
key The key to search for.
- Returns:
- 1 if the key exists, otherwise 0.
Definition at line 876 of file unordered_multiset.h.
bool empty | ( | ) | const |
Checks to see if the unordered_multiset is empty.
Definition at line 1036 of file unordered_multiset.h.
const_iterator end | ( | ) | const |
Returns a const_iterator to the end of the unordered_multiset.
- Returns:
- A const iterator to the end of the unordered_multiset.
Definition at line 545 of file unordered_multiset.h.
local_iterator end | ( | size_t | i ) |
Returns an iterator to the end of the unordered_multiset bucket.
- Returns:
- An iterator to the end of the unordered_multiset bucket.
Definition at line 563 of file unordered_multiset.h.
local_const_iterator end | ( | size_t | i ) | const |
Returns a const_iterator to the end of the unordered_multiset bucket.
- Returns:
- A const iterator to the end of the unordered_multiset bucket.
Definition at line 572 of file unordered_multiset.h.
iterator end | ( | ) |
Returns an iterator to the end of the unordered_multiset.
- Returns:
- An iterator to the end of the unordered_multiset.
Definition at line 536 of file unordered_multiset.h.
std::pair<const_iterator, const_iterator> equal_range | ( | key_parameter_t | key ) | const |
Returns a range containing all elements with key key in the container.
The range is defined by two iterators, the first pointing to the first element of the wanted range and the second pointing past the last element of the range.
- Parameters:
-
key The key to search for.
- Returns:
- A const iterator pair to the range of elements if the key exists, otherwise end().
Definition at line 999 of file unordered_multiset.h.
std::pair<iterator, iterator> equal_range | ( | key_parameter_t | key ) |
Returns a range containing all elements with key key in the container.
The range is defined by two iterators, the first pointing to the first element of the wanted range and the second pointing past the last element of the range.
- Parameters:
-
key The key to search for.
- Returns:
- An iterator pair to the range of elements if the key exists, otherwise end().
Definition at line 973 of file unordered_multiset.h.
iterator erase | ( | const_iterator | first_, |
const_iterator | last_ | ||
) |
Erases a range of elements.
The range includes all the elements between first and last, including the element pointed by first, but not the one pointed to by last.
- Parameters:
-
first Iterator to the first element. last Iterator to the last element.
Definition at line 815 of file unordered_multiset.h.
size_t erase | ( | key_parameter_t | key ) |
Erases an element.
- Parameters:
-
key The key to erase.
- Returns:
- The number of elements erased.
Definition at line 748 of file unordered_multiset.h.
iterator erase | ( | const_iterator | ielement ) |
Erases an element.
- Parameters:
-
ielement Iterator to the element.
Definition at line 784 of file unordered_multiset.h.
iterator find | ( | key_parameter_t | key ) |
Finds an element.
- Parameters:
-
key The key to search for.
- Returns:
- An iterator to the element if the key exists, otherwise end().
Definition at line 902 of file unordered_multiset.h.
const_iterator find | ( | key_parameter_t | key ) | const |
Finds an element.
- Parameters:
-
key The key to search for.
- Returns:
- An iterator to the element if the key exists, otherwise end().
Definition at line 936 of file unordered_multiset.h.
bool full | ( | ) | const |
Checks to see if the unordered_multiset is full.
Definition at line 1044 of file unordered_multiset.h.
size_type get_bucket_index | ( | key_parameter_t | key ) | const |
Returns the bucket index for the key.
- Returns:
- The bucket index for the key.
Definition at line 590 of file unordered_multiset.h.
hasher hash_function | ( | ) | const |
Returns the function that hashes the keys.
- Returns:
- The function that hashes the keys..
Definition at line 1071 of file unordered_multiset.h.
void initialise | ( | ) | [protected] |
Initialise the unordered_multiset.
Definition at line 1114 of file unordered_multiset.h.
iterator insert | ( | const_iterator | position, |
const value_type & | key | ||
) |
Inserts a value to the unordered_multiset.
If asserts or exceptions are enabled, emits unordered_multiset_full if the unordered_multiset is already full.
- Parameters:
-
position The position to insert at. value The value to insert.
Definition at line 722 of file unordered_multiset.h.
void insert | ( | TIterator | first_, |
TIterator | last_ | ||
) |
Inserts a range of values to the unordered_multiset.
If asserts or exceptions are enabled, emits unordered_multiset_full if the unordered_multiset does not have enough free space.
- Parameters:
-
position The position to insert at. first The first element to add. last The last + 1 element to add.
Definition at line 735 of file unordered_multiset.h.
std::pair<iterator, bool> insert | ( | const value_type & | key ) |
Inserts a value to the unordered_multiset.
If asserts or exceptions are enabled, emits unordered_multiset_full if the unordered_multiset is already full.
- Parameters:
-
value The value to insert.
Definition at line 653 of file unordered_multiset.h.
key_equal key_eq | ( | ) | const |
Returns the function that compares the keys.
- Returns:
- The function that compares the keys..
Definition at line 1080 of file unordered_multiset.h.
float load_factor | ( | ) | const |
Returns the load factor = size / bucket_count.
- Returns:
- The load factor = size / bucket_count.
Definition at line 1062 of file unordered_multiset.h.
size_type max_bucket_count | ( | ) | const |
Returns the maximum number of the buckets the container can hold.
- Returns:
- The maximum number of the buckets the container can hold.
Definition at line 610 of file unordered_multiset.h.
size_type max_size | ( | ) | const |
Gets the maximum possible size of the unordered_multiset.
Definition at line 1028 of file unordered_multiset.h.
iunordered_multiset& operator= | ( | const iunordered_multiset< TKey, THash, TKeyEqual > & | rhs ) |
Assignment operator.
Definition at line 1088 of file unordered_multiset.h.
size_type size | ( | ) | const |
Gets the size of the unordered_multiset.
Definition at line 1020 of file unordered_multiset.h.
Generated on Tue Jul 12 2022 14:05:55 by
