unordered_set
File unordered_set.h
Unordered sets are containers that store unique elements in no particular order, and which allow for fast retrieval of individual elements based on their value.
Keys are immutable, therefore, the elements in an unordered_set cannot be modified.
Internally, the elements in the unordered_set are not sorted in any particular order but organized into buckets depending on their hash values to allow for fast access to individual elements directly by their values (with a constant average time complexity on average).
Some of the functions of unordered_set
find(): It tries to locate an element in an unordered_set.
get_allocator(): It returns the allocator object used by the unordered_set.
hash_function(): It returns the hash functor object with which the unordered_set was constructed.
insert(): It attempts to insert an element or elements into the unordered_set.
key_seq(): It returns the key comparison object with which the unordered_set was constructed.
load_factor(): It returns the average number of elements per bucket.
max_bucket_count(): It returns the maximum number of buckets of the unordered_set.
max_load_factor(): It returns (or set the max load factor value) a value to which the unordered_set load factor is less.
max_size(): It returns the maximum size of the unordered_set.
rehash(): It may rehash the unordered_set.
reserve(): It prepares the unordered_set for a specified number of elements.
size(): It returns the size of the unordered_set.
swap(): It swaps data with another unordered_set.
No comments:
Post a Comment