Loading...
Searching...
No Matches
set

## Classes

class | etl::multiset_exception
class | etl::multiset_full
class | etl::multiset_out_of_bounds
class | etl::multiset_iterator
class | etl::multiset_base
class | etl::imultiset< TKey, TCompare >
class | etl::set_exception
class | etl::set_full
class | etl::set_out_of_bounds
class | etl::set_iterator
class | etl::set_base
class | etl::iset< TKey, TCompare >

## Detailed Description

A set with the capacity defined at compile time.

## Class Documentation

## etl::multiset_exception

class etl::multiset_exception

Exception for the set.

### Public Member Functions

| multiset_exception (string_type reason_, string_type file_name_, numeric_type line_number_)
Public Member Functions inherited from etl::exception
ETL_EXCEPTION_CONSTEXPR | exception (string_type reason_, string_type, numeric_type)
| Constructor.
ETL_EXCEPTION_CONSTEXPR string_type | what () const ETL_NOEXCEPT ETL_EXCEPTION_OVERRIDE
ETL_EXCEPTION_CONSTEXPR string_type | file_name () const
ETL_EXCEPTION_CONSTEXPR numeric_type | line_number () const

## Additional Inherited Members

Public Types inherited from etl::exception
typedef const char * | string_type
typedef int | numeric_type

## etl::multiset_full

class etl::multiset_full

Full exception for the set.

### Public Member Functions

| multiset_full (string_type file_name_, numeric_type line_number_)
Public Member Functions inherited from etl::multiset_exception
| multiset_exception (string_type reason_, string_type file_name_, numeric_type line_number_)
Public Member Functions inherited from etl::exception
ETL_EXCEPTION_CONSTEXPR | exception (string_type reason_, string_type, numeric_type)
| Constructor.
ETL_EXCEPTION_CONSTEXPR string_type | what () const ETL_NOEXCEPT ETL_EXCEPTION_OVERRIDE
ETL_EXCEPTION_CONSTEXPR string_type | file_name () const
ETL_EXCEPTION_CONSTEXPR numeric_type | line_number () const

## Additional Inherited Members

Public Types inherited from etl::exception
typedef const char * | string_type
typedef int | numeric_type

## etl::multiset_out_of_bounds

class etl::multiset_out_of_bounds

Map out of bounds exception.

### Public Member Functions

| multiset_out_of_bounds (string_type file_name_, numeric_type line_number_)
Public Member Functions inherited from etl::multiset_exception
| multiset_exception (string_type reason_, string_type file_name_, numeric_type line_number_)
Public Member Functions inherited from etl::exception
ETL_EXCEPTION_CONSTEXPR | exception (string_type reason_, string_type, numeric_type)
| Constructor.
ETL_EXCEPTION_CONSTEXPR string_type | what () const ETL_NOEXCEPT ETL_EXCEPTION_OVERRIDE
ETL_EXCEPTION_CONSTEXPR string_type | file_name () const
ETL_EXCEPTION_CONSTEXPR numeric_type | line_number () const

## Additional Inherited Members

Public Types inherited from etl::exception
typedef const char * | string_type
typedef int | numeric_type

## etl::multiset_iterator

class etl::multiset_iterator

Iterator exception for the set.

### Public Member Functions

| multiset_iterator (string_type file_name_, numeric_type line_number_)
Public Member Functions inherited from etl::multiset_exception
| multiset_exception (string_type reason_, string_type file_name_, numeric_type line_number_)
Public Member Functions inherited from etl::exception
ETL_EXCEPTION_CONSTEXPR | exception (string_type reason_, string_type, numeric_type)
| Constructor.
ETL_EXCEPTION_CONSTEXPR string_type | what () const ETL_NOEXCEPT ETL_EXCEPTION_OVERRIDE
ETL_EXCEPTION_CONSTEXPR string_type | file_name () const
ETL_EXCEPTION_CONSTEXPR numeric_type | line_number () const

## Additional Inherited Members

Public Types inherited from etl::exception
typedef const char * | string_type
typedef int | numeric_type

## etl::multiset_base

class etl::multiset_base

The base class for all sets.

### Public Types

typedef size_t | size_type
| The type used for determining the size of set.

### Public Member Functions

size_type | size () const
| Gets the size of the set.
size_type | max_size () const
| Gets the maximum possible size of the set.
bool | empty () const
| Checks to see if the set is empty.
bool | full () const
| Checks to see if the set is full.
size_type | capacity () const
size_t | available () const

### Protected Types

enum | { kLeft , kRight , kNeither }

### Protected Member Functions

| multiset_base (size_type max_size_)
| The constructor that is called from derived classes.
| ~multiset_base ()
| Destructor.
void | attach_node (Node *parent, Node *&position, Node &node)
| Attach the provided node to the position provided.
void | detach_node (Node *&position, Node *&replacement)
| Detach the node at the position provided.
void | balance_node (Node *&critical_node)
| Balance the critical node at the position provided as needed.
Node * | find_limit_node (Node *position, const int8_t dir) const
void | next_node (Node *&position) const
| Find the next node in sequence from the node provided.
void | next_node (const Node *&position) const
| Find the next node in sequence from the node provided.
void | prev_node (Node *&position) const
| Find the previous node in sequence from the node provided.
void | prev_node (const Node *&position) const
| Find the previous node in sequence from the node provided.
void | rotate_2node (Node *&position, uint_least8_t dir)
| Rotate two nodes at the position provided the to balance the tree.
void | rotate_3node (Node *&position, uint_least8_t dir, uint_least8_t third)
| Rotate three nodes at the position provided the to balance the tree.

### Protected Attributes

size_type | current_size
| The number of the used nodes.
const size_type | CAPACITY
| The maximum size of the set.
Node * | root_node
| The node that acts as the multiset root.
| ETL_DECLARE_DEBUG_COUNT

#### Member Function Documentation

## available()

size_t etl::multiset_base::available | ( |  | ) | const

inline

Returns the remaining capacity.

Returns
  The remaining capacity.

## capacity()

size_type etl::multiset_base::capacity | ( |  | ) | const

inline

Returns the capacity of the vector.

Returns
  The capacity of the vector.

## find_limit_node()

Node * etl::multiset_base::find_limit_node | ( | Node * | position,
|  | const int8_t | dir ) const

inline protected

Find the node whose key would go before all the other keys from the position provided

## etl::imultiset

class etl::imultiset

template<typename TKey, typename TCompare = ETL_OR_STD::less<TKey>>
class etl::imultiset< TKey, TCompare >

A templated base for all etl::multiset types.

### Public Types

typedef TKey | key_type
typedef TKey | value_type
typedef TCompare | key_compare
typedef TCompare | value_compare
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 etl::iterator_traits< iterator >::difference_type | difference_type
typedef ETL_OR_STD::reverse_iterator< iterator > | reverse_iterator
typedef ETL_OR_STD::reverse_iterator< const_iterator > | const_reverse_iterator
Public Types inherited from etl::multiset_base
typedef size_t | size_type
| The type used for determining the size of set.

### Public Member Functions

iterator | begin ()
| Gets the beginning of the multiset.
const_iterator | begin () const
| Gets the beginning of the multiset.
iterator | end ()
| Gets the end of the multiset.
const_iterator | end () const
| Gets the end of the multiset.
const_iterator | cbegin () const
| Gets the beginning of the multiset.
const_iterator | cend () const
| Gets the end of the multiset.
reverse_iterator | rbegin ()
| Gets the reverse beginning of the list.
const_reverse_iterator | rbegin () const
| Gets the reverse beginning of the list.
reverse_iterator | rend ()
| Gets the reverse end of the list.
const_reverse_iterator | rend () const
| Gets the reverse end of the list.
const_reverse_iterator | crbegin () const
| Gets the reverse beginning of the list.
const_reverse_iterator | crend () const
| Gets the reverse end of the list.
template<typename TIterator>
void | assign (TIterator first, TIterator last)
void | clear ()
| Clears the multiset.
size_type | count (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
iterator | erase (iterator position)
| Erases the value at the specified position.
iterator | erase (const_iterator position)
| Erases the value at the specified position.
size_type | erase (key_parameter_t key_value)
iterator | erase (const_iterator first, const_iterator last)
| Erases a range of elements.
iterator | find (key_parameter_t key_value)
const_iterator | find (key_parameter_t key_value) const
iterator | insert (const_reference value)
iterator | insert (const_iterator, const_reference value)
template<class TIterator>
void | insert (TIterator first, TIterator last)
iterator | emplace (const_reference value)
| Emplaces a value to the multiset.
template<typename T1>
iterator | emplace (const T1 &value1)
| Emplaces a value to the multiset.
iterator | lower_bound (key_parameter_t key)
const_iterator | lower_bound (key_parameter_t key) const
iterator | upper_bound (key_parameter_t key)
const_iterator | upper_bound (key_parameter_t key) const
imultiset & | operator= (const imultiset &rhs)
| Assignment operator.
key_compare | key_comp () const
| How to compare two key elements.
value_compare | value_comp () const
| How to compare two value elements.
bool | contains (key_parameter_t key) const
| Check if the set contains the key.
Public Member Functions inherited from etl::multiset_base
size_type | size () const
| Gets the size of the set.
size_type | max_size () const
| Gets the maximum possible size of the set.
bool | empty () const
| Checks to see if the set is empty.
bool | full () const
| Checks to see if the set is full.
size_type | capacity () const
size_t | available () const

### Protected Types

typedef const TKey & | key_parameter_t
| Defines the key value parameter type.
Protected Types inherited from etl::multiset_base
enum | { kLeft , kRight , kNeither }

### Protected Member Functions

bool | node_comp (const Data_Node &node1, const Data_Node &node2) const
| How to compare node elements.
bool | node_comp (const Data_Node &node, key_parameter_t key) const
bool | node_comp (key_parameter_t key, const Data_Node &node) const
| imultiset (etl::ipool &node_pool, size_t max_size_)
| Constructor.
void | initialise ()
| Initialise the multiset.
| ~imultiset ()
| Destructor.
Protected Member Functions inherited from etl::multiset_base
| multiset_base (size_type max_size_)
| The constructor that is called from derived classes.
| ~multiset_base ()
| Destructor.
void | attach_node (Node *parent, Node *&position, Node &node)
| Attach the provided node to the position provided.
void | detach_node (Node *&position, Node *&replacement)
| Detach the node at the position provided.
void | balance_node (Node *&critical_node)
| Balance the critical node at the position provided as needed.
Node * | find_limit_node (Node *position, const int8_t dir) const
void | next_node (Node *&position) const
| Find the next node in sequence from the node provided.
void | next_node (const Node *&position) const
| Find the next node in sequence from the node provided.
void | prev_node (Node *&position) const
| Find the previous node in sequence from the node provided.
void | prev_node (const Node *&position) const
| Find the previous node in sequence from the node provided.
void | rotate_2node (Node *&position, uint_least8_t dir)
| Rotate two nodes at the position provided the to balance the tree.
void | rotate_3node (Node *&position, uint_least8_t dir, uint_least8_t third)
| Rotate three nodes at the position provided the to balance the tree.

### Friends

class | iterator
class | const_iterator

## Additional Inherited Members

Protected Attributes inherited from etl::multiset_base
size_type | current_size
| The number of the used nodes.
const size_type | CAPACITY
| The maximum size of the set.
Node * | root_node
| The node that acts as the multiset root.
| ETL_DECLARE_DEBUG_COUNT

#### Member Function Documentation

## assign()

template<typename TKey, typename TCompare = ETL_OR_STD::less<TKey>>
template<typename TIterator>

void etl::imultiset< TKey, TCompare >::assign | ( | TIterator | first,
|  | TIterator | last )

inline

Assigns values to the multiset. If asserts or exceptions are enabled, emits set_full if the multiset does not have enough free space. If asserts or exceptions are enabled, emits set_iterator if the iterators are reversed.

Parameters

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

## count()

template<typename TKey, typename TCompare = ETL_OR_STD::less<TKey>>

size_type etl::imultiset< TKey, TCompare >::count | ( | key_parameter_t | key | ) | const

inline

Counts the number of elements that contain the key specified.

Parameters

  key | The key to search for.

Returns
  1 if element was found, 0 otherwise.

## equal_range() [1/2]

template<typename TKey, typename TCompare = ETL_OR_STD::less<TKey>>

ETL_OR_STD::pair< iterator, iterator > etl::imultiset< TKey, TCompare >::equal_range | ( | key_parameter_t | key | ) |

inline

Returns two iterators with bounding (lower bound, upper bound) the key provided

## equal_range() [2/2]

template<typename TKey, typename TCompare = ETL_OR_STD::less<TKey>>

ETL_OR_STD::pair< const_iterator, const_iterator > etl::imultiset< TKey, TCompare >::equal_range | ( | key_parameter_t | key | ) | const

inline

Returns two const iterators with bounding (lower bound, upper bound) the key provided.

## find() [1/2]

template<typename TKey, typename TCompare = ETL_OR_STD::less<TKey>>

iterator etl::imultiset< TKey, TCompare >::find | ( | key_parameter_t | key_value | ) |

inline

Finds an element.

Parameters

  key | The key to search for.

Returns
  An iterator pointing to the element or end() if not found.

## find() [2/2]

template<typename TKey, typename TCompare = ETL_OR_STD::less<TKey>>

const_iterator etl::imultiset< TKey, TCompare >::find | ( | key_parameter_t | key_value | ) | const

inline

Finds an element.

Parameters

  key | The key to search for.

Returns
  An iterator pointing to the element or end() if not found.

## insert() [1/3]

template<typename TKey, typename TCompare = ETL_OR_STD::less<TKey>>

iterator etl::imultiset< TKey, TCompare >::insert | ( | const_iterator | ,
|  | const_reference | value )

inline

Inserts a value to the multiset starting at the position recommended. If asserts or exceptions are enabled, emits set_full if the multiset is already full.

Parameters

  position | The position that would precede the value to insert.
  value | The value to insert.

## insert() [2/3]

template<typename TKey, typename TCompare = ETL_OR_STD::less<TKey>>

iterator etl::imultiset< TKey, TCompare >::insert | ( | const_reference | value | ) |

inline

Inserts a value to the multiset. If asserts or exceptions are enabled, emits set_full if the multiset is already full.

Parameters

  value | The value to insert.

## insert() [3/3]

template<typename TKey, typename TCompare = ETL_OR_STD::less<TKey>>
template<class TIterator>

void etl::imultiset< TKey, TCompare >::insert | ( | TIterator | first,
|  | TIterator | last )

inline

Inserts a range of values to the multiset. If asserts or exceptions are enabled, emits set_full if the 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.

## lower_bound() [1/2]

template<typename TKey, typename TCompare = ETL_OR_STD::less<TKey>>

iterator etl::imultiset< TKey, TCompare >::lower_bound | ( | key_parameter_t | key | ) |

inline

Returns an iterator pointing to the first element in the container whose key is not considered to go before the key provided or end() if all keys are considered to go before the key provided.

Returns
  An iterator pointing to the element not before key or end()

## lower_bound() [2/2]

template<typename TKey, typename TCompare = ETL_OR_STD::less<TKey>>

const_iterator etl::imultiset< TKey, TCompare >::lower_bound | ( | key_parameter_t | key | ) | const

inline

Returns a const_iterator pointing to the first element in the container whose key is not considered to go before the key provided or end() if all keys are considered to go before the key provided.

Returns
  An const_iterator pointing to the element not before key or end()

## upper_bound() [1/2]

template<typename TKey, typename TCompare = ETL_OR_STD::less<TKey>>

iterator etl::imultiset< TKey, TCompare >::upper_bound | ( | key_parameter_t | key | ) |

inline

Returns an iterator pointing to the first element in the container whose key is not considered to go after the key provided or end() if all keys are considered to go after the key provided.

Returns
  An iterator pointing to the element after key or end()

## upper_bound() [2/2]

template<typename TKey, typename TCompare = ETL_OR_STD::less<TKey>>

const_iterator etl::imultiset< TKey, TCompare >::upper_bound | ( | key_parameter_t | key | ) | const

inline

Returns a const_iterator pointing to the first element in the container whose key is not considered to go after the key provided or end() if all keys are considered to go after the key provided.

Returns
  An const_iterator pointing to the element after key or end()

## etl::set_exception

class etl::set_exception

Exception for the set.

### Public Member Functions

| set_exception (string_type reason_, string_type file_name_, numeric_type line_number_)
Public Member Functions inherited from etl::exception
ETL_EXCEPTION_CONSTEXPR | exception (string_type reason_, string_type, numeric_type)
| Constructor.
ETL_EXCEPTION_CONSTEXPR string_type | what () const ETL_NOEXCEPT ETL_EXCEPTION_OVERRIDE
ETL_EXCEPTION_CONSTEXPR string_type | file_name () const
ETL_EXCEPTION_CONSTEXPR numeric_type | line_number () const

## Additional Inherited Members

Public Types inherited from etl::exception
typedef const char * | string_type
typedef int | numeric_type

## etl::set_full

class etl::set_full

Full exception for the set.

### Public Member Functions

| set_full (string_type file_name_, numeric_type line_number_)
Public Member Functions inherited from etl::set_exception
| set_exception (string_type reason_, string_type file_name_, numeric_type line_number_)
Public Member Functions inherited from etl::exception
ETL_EXCEPTION_CONSTEXPR | exception (string_type reason_, string_type, numeric_type)
| Constructor.
ETL_EXCEPTION_CONSTEXPR string_type | what () const ETL_NOEXCEPT ETL_EXCEPTION_OVERRIDE
ETL_EXCEPTION_CONSTEXPR string_type | file_name () const
ETL_EXCEPTION_CONSTEXPR numeric_type | line_number () const

## Additional Inherited Members

Public Types inherited from etl::exception
typedef const char * | string_type
typedef int | numeric_type

## etl::set_out_of_bounds

class etl::set_out_of_bounds

Map out of bounds exception.

### Public Member Functions

| set_out_of_bounds (string_type file_name_, numeric_type line_number_)
Public Member Functions inherited from etl::set_exception
| set_exception (string_type reason_, string_type file_name_, numeric_type line_number_)
Public Member Functions inherited from etl::exception
ETL_EXCEPTION_CONSTEXPR | exception (string_type reason_, string_type, numeric_type)
| Constructor.
ETL_EXCEPTION_CONSTEXPR string_type | what () const ETL_NOEXCEPT ETL_EXCEPTION_OVERRIDE
ETL_EXCEPTION_CONSTEXPR string_type | file_name () const
ETL_EXCEPTION_CONSTEXPR numeric_type | line_number () const

## Additional Inherited Members

Public Types inherited from etl::exception
typedef const char * | string_type
typedef int | numeric_type

## etl::set_iterator

class etl::set_iterator

Iterator exception for the set.

### Public Member Functions

| set_iterator (string_type file_name_, numeric_type line_number_)
Public Member Functions inherited from etl::set_exception
| set_exception (string_type reason_, string_type file_name_, numeric_type line_number_)
Public Member Functions inherited from etl::exception
ETL_EXCEPTION_CONSTEXPR | exception (string_type reason_, string_type, numeric_type)
| Constructor.
ETL_EXCEPTION_CONSTEXPR string_type | what () const ETL_NOEXCEPT ETL_EXCEPTION_OVERRIDE
ETL_EXCEPTION_CONSTEXPR string_type | file_name () const
ETL_EXCEPTION_CONSTEXPR numeric_type | line_number () const

## Additional Inherited Members

Public Types inherited from etl::exception
typedef const char * | string_type
typedef int | numeric_type

## etl::set_base

class etl::set_base

The base class for all sets.

### Public Types

typedef size_t | size_type
| The type used for determining the size of set.

### Public Member Functions

size_type | size () const
| Gets the size of the set.
size_type | max_size () const
| Gets the maximum possible size of the set.
bool | empty () const
| Checks to see if the set is empty.
bool | full () const
| Checks to see if the set is full.
size_type | capacity () const
size_t | available () const

### Protected Types

enum | { kLeft = 0 , kRight = 1 , kNeither = 2 }

### Protected Member Functions

| set_base (size_type max_size_)
| The constructor that is called from derived classes.
| ~set_base ()
| The constructor that is called from derived classes.
void | attach_node (Node *&position, Node &node)
| Attach the provided node to the position provided.
void | detach_node (Node *&position, Node *&replacement)
| Detach the node at the position provided.
void | balance_node (Node *&critical_node)
| Balance the critical node at the position provided as needed.
Node * | find_limit_node (Node *position, const int8_t dir) const
const Node * | find_limit_node (const Node *position, const int8_t dir) const
void | rotate_2node (Node *&position, uint_least8_t dir)
| Rotate two nodes at the position provided the to balance the tree.
void | rotate_3node (Node *&position, uint_least8_t dir, uint_least8_t third)
| Rotate three nodes at the position provided the to balance the tree.

### Protected Attributes

size_type | current_size
| The number of the used nodes.
const size_type | CAPACITY
| The maximum size of the set.
Node * | root_node
| The node that acts as the set root.
| ETL_DECLARE_DEBUG_COUNT

#### Member Function Documentation

## available()

size_t etl::set_base::available | ( |  | ) | const

inline

Returns the remaining capacity.

Returns
  The remaining capacity.

## capacity()

size_type etl::set_base::capacity | ( |  | ) | const

inline

Returns the capacity of the vector.

Returns
  The capacity of the vector.

## find_limit_node() [1/2]

const Node * etl::set_base::find_limit_node | ( | const Node * | position,
|  | const int8_t | dir ) const

inline protected

Find the node whose key would go before all the other keys from the position provided

## find_limit_node() [2/2]

Node * etl::set_base::find_limit_node | ( | Node * | position,
|  | const int8_t | dir ) const

inline protected

Find the node whose key would go before all the other keys from the position provided

## etl::iset

class etl::iset

template<typename TKey, typename TCompare = etl::less<TKey>>
class etl::iset< TKey, TCompare >

A templated base for all etl::set types.

### Public Types

typedef TKey | key_type
typedef TKey | value_type
typedef TCompare | key_compare
typedef TCompare | value_compare
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 etl::iterator_traits< iterator >::difference_type | difference_type
typedef ETL_OR_STD::reverse_iterator< iterator > | reverse_iterator
typedef ETL_OR_STD::reverse_iterator< const_iterator > | const_reverse_iterator
Public Types inherited from etl::set_base
typedef size_t | size_type
| The type used for determining the size of set.

### Public Member Functions

iset & | operator= (const iset &rhs)
| Assignment operator.
iterator | begin ()
| Gets the beginning of the set.
const_iterator | begin () const
| Gets the beginning of the set.
iterator | end ()
| Gets the end of the set.
const_iterator | end () const
| Gets the end of the set.
const_iterator | cbegin () const
| Gets the beginning of the set.
const_iterator | cend () const
| Gets the end of the set.
reverse_iterator | rbegin ()
| Gets the reverse beginning of the list.
const_reverse_iterator | rbegin () const
| Gets the reverse beginning of the list.
reverse_iterator | rend ()
| Gets the reverse end of the list.
const_reverse_iterator | rend () const
| Gets the reverse end of the list.
const_reverse_iterator | crbegin () const
| Gets the reverse beginning of the list.
const_reverse_iterator | crend () const
| Gets the reverse end of the list.
template<typename TIterator>
void | assign (TIterator first, TIterator last)
void | clear ()
| Clears the set.
size_type | count (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
iterator | erase (iterator position)
| Erases the value at the specified position.
iterator | erase (const_iterator position)
| Erases the value at the specified position.
size_type | erase (key_parameter_t key_value)
iterator | erase (const_iterator first, const_iterator last)
| Erases a range of elements.
iterator | find (key_parameter_t key_value)
const_iterator | find (key_parameter_t key_value) const
ETL_OR_STD::pair< iterator, bool > | insert (const_reference value)
iterator | insert (const_iterator, const_reference value)
template<class TIterator>
void | insert (TIterator first, TIterator last)
ETL_OR_STD::pair< iterator, bool > | emplace (const_reference value)
| Emplaces a value to the set.
template<typename T1>
ETL_OR_STD::pair< iterator, bool > | emplace (const T1 &value1)
| Emplaces a value to the set.
iterator | lower_bound (key_parameter_t key)
const_iterator | lower_bound (key_parameter_t key) const
iterator | upper_bound (key_parameter_t key)
const_iterator | upper_bound (key_parameter_t key) const
key_compare | key_comp () const
| How to compare two key elements.
value_compare | value_comp () const
| How to compare two value elements.
bool | contains (const TKey &key) const
| Check if the set contains the key.
Public Member Functions inherited from etl::set_base
size_type | size () const
| Gets the size of the set.
size_type | max_size () const
| Gets the maximum possible size of the set.
bool | empty () const
| Checks to see if the set is empty.
bool | full () const
| Checks to see if the set is full.
size_type | capacity () const
size_t | available () const

### Protected Types

typedef etl::parameter_type< TKey >::type | key_parameter_t
| Defines the key value parameter type.
Protected Types inherited from etl::set_base
enum | { kLeft = 0 , kRight = 1 , kNeither = 2 }

### Protected Member Functions

bool | node_comp (const Data_Node &node1, const Data_Node &node2) const
| How to compare node elements.
bool | node_comp (const Data_Node &node, key_parameter_t key) const
bool | node_comp (key_parameter_t key, const Data_Node &node) const
| iset (etl::ipool &node_pool, size_t max_size_)
| Constructor.
void | initialise ()
| Initialise the set.
| ~iset ()
| Destructor.
Protected Member Functions inherited from etl::set_base
| set_base (size_type max_size_)
| The constructor that is called from derived classes.
| ~set_base ()
| The constructor that is called from derived classes.
void | attach_node (Node *&position, Node &node)
| Attach the provided node to the position provided.
void | detach_node (Node *&position, Node *&replacement)
| Detach the node at the position provided.
void | balance_node (Node *&critical_node)
| Balance the critical node at the position provided as needed.
Node * | find_limit_node (Node *position, const int8_t dir) const
const Node * | find_limit_node (const Node *position, const int8_t dir) const
void | rotate_2node (Node *&position, uint_least8_t dir)
| Rotate two nodes at the position provided the to balance the tree.
void | rotate_3node (Node *&position, uint_least8_t dir, uint_least8_t third)
| Rotate three nodes at the position provided the to balance the tree.

### Friends

class | iterator
class | const_iterator

## Additional Inherited Members

Protected Attributes inherited from etl::set_base
size_type | current_size
| The number of the used nodes.
const size_type | CAPACITY
| The maximum size of the set.
Node * | root_node
| The node that acts as the set root.
| ETL_DECLARE_DEBUG_COUNT

#### Member Function Documentation

## assign()

template<typename TKey, typename TCompare = etl::less<TKey>>
template<typename TIterator>

void etl::iset< TKey, TCompare >::assign | ( | TIterator | first,
|  | TIterator | last )

inline

Assigns values to the set. If asserts or exceptions are enabled, emits set_full if the set does not have enough free space. If asserts or exceptions are enabled, emits set_iterator if the iterators are reversed.

Parameters

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

## count()

template<typename TKey, typename TCompare = etl::less<TKey>>

size_type etl::iset< TKey, TCompare >::count | ( | key_parameter_t | key | ) | const

inline

Counts the number of elements that contain the key specified.

Parameters

  key | The key to search for.

Returns
  1 if element was found, 0 otherwise.

## equal_range() [1/2]

template<typename TKey, typename TCompare = etl::less<TKey>>

ETL_OR_STD::pair< iterator, iterator > etl::iset< TKey, TCompare >::equal_range | ( | key_parameter_t | key | ) |

inline

Returns two iterators with bounding (lower bound, upper bound) the value provided

## equal_range() [2/2]

template<typename TKey, typename TCompare = etl::less<TKey>>

ETL_OR_STD::pair< const_iterator, const_iterator > etl::iset< TKey, TCompare >::equal_range | ( | key_parameter_t | key | ) | const

inline

Returns two const iterators with bounding (lower bound, upper bound) the value provided.

## find() [1/2]

template<typename TKey, typename TCompare = etl::less<TKey>>

iterator etl::iset< TKey, TCompare >::find | ( | key_parameter_t | key_value | ) |

inline

Finds an element.

Parameters

  key | The key to search for.

Returns
  An iterator pointing to the element or end() if not found.

## find() [2/2]

template<typename TKey, typename TCompare = etl::less<TKey>>

const_iterator etl::iset< TKey, TCompare >::find | ( | key_parameter_t | key_value | ) | const

inline

Finds an element.

Parameters

  key | The key to search for.

Returns
  An iterator pointing to the element or end() if not found.

## insert() [1/3]

template<typename TKey, typename TCompare = etl::less<TKey>>

iterator etl::iset< TKey, TCompare >::insert | ( | const_iterator | ,
|  | const_reference | value )

inline

Inserts a value to the set starting at the position recommended. If asserts or exceptions are enabled, emits set_full if the set is already full.

Parameters

  position | The position that would precede the value to insert.
  value | The value to insert.

## insert() [2/3]

template<typename TKey, typename TCompare = etl::less<TKey>>

ETL_OR_STD::pair< iterator, bool > etl::iset< TKey, TCompare >::insert | ( | const_reference | value | ) |

inline

Inserts a value to the set. If asserts or exceptions are enabled, emits set_full if the set is already full.

Parameters

  value | The value to insert.

## insert() [3/3]

template<typename TKey, typename TCompare = etl::less<TKey>>
template<class TIterator>

void etl::iset< TKey, TCompare >::insert | ( | TIterator | first,
|  | TIterator | last )

inline

Inserts a range of values to the set. If asserts or exceptions are enabled, emits set_full if the set 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.

## lower_bound() [1/2]

template<typename TKey, typename TCompare = etl::less<TKey>>

iterator etl::iset< TKey, TCompare >::lower_bound | ( | key_parameter_t | key | ) |

inline

Returns an iterator pointing to the first element in the container whose key is not considered to go before the key provided or end() if all keys are considered to go before the key provided.

Returns
  An iterator pointing to the element not before key or end()

## lower_bound() [2/2]

template<typename TKey, typename TCompare = etl::less<TKey>>

const_iterator etl::iset< TKey, TCompare >::lower_bound | ( | key_parameter_t | key | ) | const

inline

Returns a const_iterator pointing to the first element in the container whose key is not considered to go before the key provided or end() if all keys are considered to go before the key provided.

Returns
  An const_iterator pointing to the element not before key or end()

## upper_bound() [1/2]

template<typename TKey, typename TCompare = etl::less<TKey>>

iterator etl::iset< TKey, TCompare >::upper_bound | ( | key_parameter_t | key | ) |

inline

Returns an iterator pointing to the first element in the container whose key is not considered to go after the key provided or end() if all keys are considered to go after the key provided.

Returns
  An iterator pointing to the element after key or end()

## upper_bound() [2/2]

template<typename TKey, typename TCompare = etl::less<TKey>>

const_iterator etl::iset< TKey, TCompare >::upper_bound | ( | key_parameter_t | key | ) | const

inline

Returns a const_iterator pointing to the first element in the container whose key is not considered to go after the key provided or end() if all keys are considered to go after the key provided.

Returns
  An const_iterator pointing to the element after key or end()