Public Types |
typedef size_t | size_type |
| The type used for determining the size of set.
|
Public Member Functions |
| set () |
| Default constructor.
|
| set (const set &other) |
| Copy constructor.
|
template<typename TIterator > |
| set (TIterator first, TIterator last) |
| Constructor, from an iterator range.
|
| ~set () |
| Destructor.
|
set & | operator= (const set &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) |
| Assigns values to the set.
|
void | clear () |
| Clears the set.
|
size_type | count (key_parameter_t key) const |
| Counts the number of elements that contain the key specified.
|
std::pair< iterator, iterator > | equal_range (const value_type &value) |
| Returns two iterators with bounding (lower bound, upper bound) the value provided.
|
std::pair< const_iterator,
const_iterator > | equal_range (const value_type &value) const |
| Returns two const iterators with bounding (lower bound, upper bound) the value provided.
|
void | erase (iterator position) |
| Erases the value at the specified position.
|
iterator | erase (const_iterator position) |
| Erases the value at the specified position.
|
iterator | erase (iterator first, iterator last) |
| Erases a range of elements.
|
iterator | erase (const_iterator first, const_iterator last) |
| Erases a range of elements.
|
iterator | find (key_parameter_t key_value) |
| Finds an element.
|
const_iterator | find (key_parameter_t key_value) const |
| Finds an element.
|
std::pair< iterator, bool > | insert (value_type &value) |
| Inserts a value to the set.
|
iterator | insert (iterator, value_type &value) |
| Inserts a value to the set starting at the position recommended.
|
iterator | insert (const_iterator, value_type &value) |
| Inserts a value to the set starting at the position recommended.
|
template<class TIterator > |
void | insert (TIterator first, TIterator last) |
| Inserts a range of values to the set.
|
iterator | lower_bound (key_parameter_t key) |
| 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.
|
const_iterator | lower_bound (key_parameter_t key) const |
| 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.
|
iterator | upper_bound (key_parameter_t key) |
| 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.
|
const_iterator | upper_bound (key_parameter_t key) const |
| 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.
|
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 |
| Returns the capacity of the vector.
|
size_t | available () const |
| Returns the remaining capacity.
|
Protected Types |
typedef etl::parameter_type< T >
::type | key_parameter_t |
| Defines the key value parameter type.
|
Protected Member Functions |
bool | node_comp (const Data_Node &node1, const Data_Node &node2) const |
| How to compare node elements.
|
void | initialise () |
| Initialise the set.
|
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 |
| Find the node whose key would go before all the other keys from the position provided.
|
const Node * | find_limit_node (const Node *position, const int8_t dir) const |
| Find the node whose key would go before all the other keys from the position 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 set root.
|