Loading...
Searching...
No Matches
etl::unordered_set< TKey, MAX_SIZE_, MAX_BUCKETS_, THash, TKeyEqual > Class Template Reference

A templated unordered_set implementation that uses a fixed size buffer. More...

`#include <unordered_set.h>`

## Public Member Functions

| unordered_set (const THash &hash=THash(), const TKeyEqual &equal=TKeyEqual())
| Default constructor.
| unordered_set (const unordered_set &other)
| Copy constructor.
template<typename TIterator>
| unordered_set (TIterator first_, TIterator last_, const THash &hash=THash(), const TKeyEqual &equal=TKeyEqual())
| ~unordered_set ()
| Destructor.
unordered_set & | operator= (const unordered_set &rhs)
| Assignment operator.
Public Member Functions inherited from etl::iunordered_set< TKey, THash, TKeyEqual >
iterator | begin ()
const_iterator | begin () const
const_iterator | cbegin () const
local_iterator | begin (size_t i)
const_local_iterator | begin (size_t i) const
const_local_iterator | cbegin (size_t i) const
iterator | end ()
const_iterator | end () const
const_iterator | cend () const
local_iterator | end (size_t i)
const_local_iterator | end (size_t i) const
const_local_iterator | cend (size_t i) const
size_type | get_bucket_index (key_parameter_t key) const
size_type | bucket_size (key_parameter_t key) const
size_type | max_bucket_count () const
size_type | bucket_count () const
template<typename TIterator>
void | assign (TIterator first_, TIterator last_)
ETL_OR_STD::pair< iterator, bool > | insert (const_reference key)
iterator | insert (const_iterator, const_reference key)
template<class TIterator>
void | insert (TIterator first_, TIterator last_)
size_t | erase (key_parameter_t key)
iterator | erase (const_iterator ielement)
iterator | erase (const_iterator first_, const_iterator last_)
void | clear ()
| Clears the unordered_set.
size_t | count (key_parameter_t key) const
iterator | find (key_parameter_t key)
const_iterator | find (key_parameter_t key) const
ETL_OR_STD::pair< iterator, iterator > | equal_range (key_parameter_t key)
ETL_OR_STD::pair< const_iterator, const_iterator > | equal_range (key_parameter_t key) const
size_type | size () const
| Gets the size of the unordered_set.
size_type | max_size () const
| Gets the maximum possible size of the unordered_set.
size_type | capacity () const
| Gets the maximum possible size of the unordered_set.
bool | empty () const
| Checks to see if the unordered_set is empty.
bool | full () const
| Checks to see if the unordered_set is full.
size_t | available () const
float | load_factor () const
hasher | hash_function () const
key_equal | key_eq () const
iunordered_set & | operator= (const iunordered_set &rhs)
| Assignment operator.
bool | contains (key_parameter_t key) const
| Check if the unordered_set contains the key.

## Static Public Attributes

static ETL_CONSTANT size_t | MAX_SIZE = MAX_SIZE_
static ETL_CONSTANT size_t | MAX_BUCKETS = MAX_BUCKETS_

## Additional Inherited Members

Public Types inherited from etl::iunordered_set< TKey, THash, TKeyEqual >
typedef TKey | value_type
typedef TKey | key_type
typedef THash | hasher
typedef TKeyEqual | key_equal
typedef value_type & | reference
typedef const value_type & | const_reference
typedef value_type * | pointer
typedef const value_type * | const_pointer
typedef size_t | size_type
typedef const TKey & | key_parameter_t
typedef etl::forward_link< 0 > | link_t
typedef bucket_t::iterator | local_iterator
typedef bucket_t::const_iterator | const_local_iterator
typedef etl::iterator_traits< iterator >::difference_type | difference_type
Protected Types inherited from etl::iunordered_set< TKey, THash, TKeyEqual >
typedef etl::intrusive_forward_list< node_t, link_t > | bucket_t
typedef etl::ipool | pool_t
Protected Member Functions inherited from etl::iunordered_set< TKey, THash, TKeyEqual >
| iunordered_set (pool_t &node_pool_, bucket_t *pbuckets_, size_t number_of_buckets_, hasher key_hash_function_, key_equal key_equal_function_)
| Constructor.
void | initialise ()
| Initialise the unordered_set.
| ~iunordered_set ()
| Destructor.

## Detailed Description

template<typename TKey, const size_t MAX_SIZE_, size_t MAX_BUCKETS_ = MAX_SIZE_, typename THash = etl::hash<TKey>, typename TKeyEqual = etl::equal_to<TKey>>
class etl::unordered_set< TKey, MAX_SIZE_, MAX_BUCKETS_, THash, TKeyEqual >

A templated unordered_set implementation that uses a fixed size buffer.

## Constructor & Destructor Documentation

## unordered_set()

template<typename TKey, const size_t MAX_SIZE_, size_t MAX_BUCKETS_ = MAX_SIZE_, typename THash = etl::hash<TKey>, typename TKeyEqual = etl::equal_to<TKey>>
template<typename TIterator>

etl::unordered_set< TKey, MAX_SIZE_, MAX_BUCKETS_, THash, TKeyEqual >::unordered_set | ( | TIterator | first_,
|  | TIterator | last_,
|  | const THash & | hash = THash(),
|  | const TKeyEqual & | equal = TKeyEqual() )

inline

Constructor, from an iterator range.

Template Parameters

  TIterator | The iterator type.

Parameters

  first | The iterator to the first element.
  last | The iterator to the last element + 1.

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

- include/etl/unordered_set.h