31 #ifndef ETL_MAP_INCLUDED
32 #define ETL_MAP_INCLUDED
52 #if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && ETL_USING_STL
53 #include <initializer_list>
77 map_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
78 :
exception(reason_, file_name_, line_number_)
91 map_full(string_type file_name_, numeric_type line_number_)
119 map_iterator(string_type file_name_, numeric_type line_number_)
203 weight(uint_least8_t(kNeither)),
204 dir(uint_least8_t(kNeither))
218 weight = uint_least8_t(kNeither);
219 dir = uint_least8_t(kNeither);
220 children[0] = ETL_NULLPTR;
221 children[1] = ETL_NULLPTR;
225 uint_least8_t weight;
255 Node* weight_node = critical_node->children[critical_node->dir];
259 if (uint_least8_t(kNeither) != weight_node->dir)
262 if (weight_node->weight == 1 - weight_node->dir)
264 weight_node->weight = uint_least8_t(kNeither);
268 weight_node->weight = weight_node->dir;
272 weight_node = weight_node->children[weight_node->dir];
282 if (uint_least8_t(kNeither) == critical_node->weight)
284 critical_node->weight = critical_node->dir;
287 else if (critical_node->dir != critical_node->weight)
289 critical_node->weight = uint_least8_t(kNeither);
296 if (critical_node->weight == critical_node->children[critical_node->dir]->dir)
305 critical_node->children[critical_node->dir]->children[1 - critical_node->dir]->dir);
327 Node* new_root = position->children[dir];
329 position->children[dir] = new_root->children[1 - dir];
331 new_root->children[1 - dir] = position;
333 position->weight = uint_least8_t(kNeither);
337 position->weight = uint_least8_t(kNeither);
358 Node* new_root = position->children[dir]->children[1 - dir];
360 position->children[dir]->weight = third != uint_least8_t(kNeither) && third != dir ? dir : uint_least8_t(kNeither);
363 position->children[dir]->children[1 - dir] =
364 new_root->children[dir];
366 new_root->children[dir] = position->children[dir];
368 position->weight = third != uint_least8_t(kNeither) && third == dir ? 1 - dir : uint_least8_t(kNeither);
371 position->children[dir] = new_root->children[1 - dir];
373 new_root->children[1 - dir] = position;
377 position->weight = uint_least8_t(kNeither);
387 Node* limit_node = position;
388 while (limit_node && limit_node->children[dir])
390 limit_node = limit_node->children[dir];
404 const Node* limit_node = position;
405 while (limit_node && limit_node->children[dir])
407 limit_node = limit_node->children[dir];
437 Node* detached = position;
445 replacement =
swap->children[1 -
swap->dir];
448 swap->children[kLeft] = detached->children[kLeft];
449 swap->children[kRight] = detached->children[kRight];
450 swap->weight = detached->weight;
456 ETL_DECLARE_DEBUG_COUNT
463 template <
typename TKey,
typename TMapped,
typename TKeyCompare = etl::less<TKey> >
468 typedef TKey key_type;
469 typedef ETL_OR_STD::pair<const TKey, TMapped> value_type;
470 typedef TMapped mapped_type;
471 typedef TKeyCompare key_compare;
472 typedef value_type& reference;
473 typedef const value_type& const_reference;
474 #if ETL_CPP11_SUPPORTED
475 typedef value_type&& rvalue_reference;
477 typedef value_type* pointer;
478 typedef const value_type* const_pointer;
485 bool operator()(const_reference lhs, const_reference rhs)
const
487 return (kcompare(lhs.first, rhs.first));
492 key_compare kcompare;
523 return kcompare(node1.value.first, node2.value.first);
527 return kcompare(node.value.first, key);
531 return kcompare(key, node.value.first);
539 key_compare kcompare;
540 value_compare vcompare;
545 static Data_Node* data_cast(Node* p_node)
547 return static_cast<Data_Node*
>(p_node);
553 static Data_Node& data_cast(Node& node)
555 return static_cast<Data_Node&
>(node);
561 static const Data_Node* data_cast(
const Node* p_node)
563 return static_cast<const Data_Node*
>(p_node);
569 static const Data_Node& data_cast(
const Node& node)
571 return static_cast<const Data_Node&
>(node);
588 , p_node(ETL_NULLPTR)
594 , p_node(ETL_NULLPTR)
606 , p_node(other.p_node)
616 p_map->next_node(p_node);
623 p_map->next_node(p_node);
629 p_map->prev_node(p_node);
636 p_map->prev_node(p_node);
643 p_node = other.p_node;
647 reference operator *()
649 return imap::data_cast(p_node)->value;
652 const_reference operator *()
const
654 return imap::data_cast(p_node)->value;
659 return &(imap::data_cast(p_node)->value);
664 return &(imap::data_cast(p_node)->value);
667 pointer operator ->()
669 return &(imap::data_cast(p_node)->value);
672 const_pointer operator ->()
const
674 return &(imap::data_cast(p_node)->value);
679 return lhs.p_map == rhs.p_map && lhs.p_node == rhs.p_node;
684 return !(lhs == rhs);
709 , p_node(ETL_NULLPTR)
715 , p_node(ETL_NULLPTR)
727 , p_node(other.p_node)
733 , p_node(other.p_node)
743 p_map->next_node(p_node);
750 p_map->next_node(p_node);
756 p_map->prev_node(p_node);
763 p_map->prev_node(p_node);
770 p_node = other.p_node;
774 const_reference operator *()
const
776 return imap::data_cast(p_node)->value;
781 return imap::data_cast(p_node)->value;
784 const_pointer operator ->()
const
786 return &(imap::data_cast(p_node)->value);
791 return lhs.p_map == rhs.p_map && lhs.p_node == rhs.p_node;
796 return !(lhs == rhs);
809 typedef typename etl::iterator_traits<iterator>::difference_type difference_type;
811 typedef ETL_OR_STD::reverse_iterator<iterator> reverse_iterator;
812 typedef ETL_OR_STD::reverse_iterator<const_iterator> const_reverse_iterator;
867 return reverse_iterator(
iterator(*
this));
889 const_reverse_iterator
rend()
const
905 const_reverse_iterator
crend()
const
919 if (!i_element.p_node)
922 i_element =
insert(ETL_OR_STD::make_pair(key, mapped_type())).first;
925 return i_element->second;
940 return i_element->second;
955 return i_element->second;
965 template <
typename TIterator>
966 void assign(TIterator first, TIterator last)
987 return find_node(
root_node, key) ? 1 : 0;
996 return ETL_OR_STD::make_pair<iterator, iterator>(
1007 return ETL_OR_STD::make_pair<const_iterator, const_iterator>(
1018 erase((*position).first);
1027 Node*& reference_node = find_node(
root_node, position.p_node);
1028 iterator next(*
this, reference_node);
1031 remove_node(
root_node, (*position).first);
1042 return remove_node(
root_node, key) ? 1 : 0;
1051 while (first != last)
1065 while (first != last)
1067 next =
erase(first++);
1098 ETL_OR_STD::pair<iterator, bool>
insert(const_reference value)
1101 Node* inserted_node = ETL_NULLPTR;
1102 bool inserted =
false;
1107 Data_Node& node = allocate_data_node(value);
1110 inserted_node = insert_node(
root_node, node);
1111 inserted = inserted_node == &node;
1114 return ETL_OR_STD::make_pair(
iterator(*
this, inserted_node), inserted);
1117 #if ETL_CPP11_SUPPORTED
1123 ETL_OR_STD::pair<iterator, bool>
insert(rvalue_reference value)
1126 Node* inserted_node = ETL_NULLPTR;
1127 bool inserted =
false;
1132 Data_Node& node = allocate_data_node(etl::move(value));
1135 inserted_node = insert_node(
root_node, node);
1136 inserted = inserted_node == &node;
1139 return ETL_OR_STD::make_pair(
iterator(*
this, inserted_node), inserted);
1152 Node* inserted_node = ETL_NULLPTR;
1157 Data_Node& node = allocate_data_node(value);
1160 inserted_node = insert_node(
root_node, node);
1163 return iterator(*
this, inserted_node);
1166 #if ETL_CPP11_SUPPORTED
1176 Node* inserted_node = ETL_NULLPTR;
1181 Data_Node& node = allocate_data_node(etl::move(value));
1184 inserted_node = insert_node(
root_node, node);
1187 return iterator(*
this, inserted_node);
1200 Node* inserted_node = ETL_NULLPTR;
1205 Data_Node& node = allocate_data_node(value);
1208 inserted_node = insert_node(
root_node, node);
1211 return iterator(*
this, inserted_node);
1214 #if ETL_CPP11_SUPPORTED
1224 Node* inserted_node = ETL_NULLPTR;
1229 Data_Node& node = allocate_data_node(etl::move(value));
1232 inserted_node = insert_node(
root_node, node);
1235 return iterator(*
this, inserted_node);
1246 template <
class TIterator>
1249 while (first != last)
1313 #if ETL_CPP11_SUPPORTED
1326 while (from != rhs.end())
1328 this->
insert(etl::move(*from++));
1359 , p_node_pool(&node_pool)
1370 while (item !=
end())
1381 Data_Node& allocate_data_node(const_reference value)
1383 Data_Node& node = create_data_node();
1384 ::new (&node.value) value_type(value);
1385 ETL_INCREMENT_DEBUG_COUNT
1389 #if ETL_CPP11_SUPPORTED
1393 Data_Node& allocate_data_node(rvalue_reference value)
1395 Data_Node& node = create_data_node();
1396 ::new (&node.value) value_type(
etl::move(value));
1397 ETL_INCREMENT_DEBUG_COUNT
1405 Data_Node& create_data_node()
1407 Data_Node* (
etl::ipool::*func)() = &etl::ipool::allocate<Data_Node>;
1408 return *(p_node_pool->*func)();
1414 void destroy_data_node(Data_Node& node)
1416 node.value.~value_type();
1417 p_node_pool->release(&node);
1418 ETL_DECREMENT_DEBUG_COUNT
1426 Node* found = position;
1430 Data_Node& found_data_node = imap::data_cast(*found);
1436 found = found->children[kLeft];
1438 else if (
node_comp(found_data_node, key))
1441 found = found->children[kRight];
1457 const Node* find_node(
const Node* position,
key_parameter_t key)
const
1459 const Node* found = position;
1463 const Data_Node& found_data_node = imap::data_cast(*found);
1469 found = found->children[kLeft];
1471 else if (
node_comp(found_data_node, key))
1474 found = found->children[kRight];
1490 Node*& find_node(Node*& position,
const Node* node)
1492 Node* found = position;
1495 if (found->children[kLeft] == node)
1497 return found->children[kLeft];
1499 else if (found->children[kRight] == node)
1501 return found->children[kRight];
1506 Data_Node& found_data_node = imap::data_cast(*found);
1507 const Data_Node& data_node = imap::data_cast(*node);
1510 if (
node_comp(data_node, found_data_node))
1513 found = found->children[kLeft];
1515 else if (
node_comp(found_data_node, data_node))
1518 found = found->children[kRight];
1536 Node* find_parent_node(Node* position,
const Node* node)
1539 Node* found = ETL_NULLPTR;
1542 if (position && node && position != node)
1547 if (position->children[kLeft] != node &&
1548 position->children[kRight] != node)
1551 const Data_Node& node_data_node = imap::data_cast(*node);
1552 Data_Node& position_data_node = imap::data_cast(*position);
1554 if (
node_comp(node_data_node, position_data_node))
1557 position = position->children[kLeft];
1559 else if (
node_comp(position_data_node, node_data_node))
1562 position = position->children[kRight];
1584 const Node* find_parent_node(
const Node* position,
const Node* node)
const
1587 const Node* found = ETL_NULLPTR;
1590 if (position && node && position != node)
1595 if (position->children[kLeft] != node &&
1596 position->children[kRight] != node)
1599 const Data_Node& node_data_node = imap::data_cast(*node);
1600 const Data_Node& position_data_node = imap::data_cast(*position);
1602 if (
node_comp(node_data_node, position_data_node))
1605 position = position->children[kLeft];
1607 else if (
node_comp(position_data_node, node_data_node))
1610 position = position->children[kRight];
1634 Node* lower_node = ETL_NULLPTR;
1638 Data_Node& data_node = imap::data_cast(*position);
1642 lower_node = position;
1643 if (position->children[kLeft])
1645 position = position->children[kLeft];
1655 position = position->children[kRight];
1660 lower_node = position;
1661 position = position->children[kLeft];
1675 Node* upper_node = ETL_NULLPTR;
1677 Node* node = position;
1681 Data_Node& data_node = imap::data_cast(*node);
1686 node = node->children[kLeft];
1690 node = node->children[kRight];
1692 else if (node->children[kRight])
1710 Node* insert_node(Node*& position, Data_Node& node)
1713 Node* found = position;
1719 Node* critical_parent_node = ETL_NULLPTR;
1726 if (kNeither != found->weight)
1728 critical_node = found;
1732 Data_Node& found_data_node = imap::data_cast(*found);
1741 else if (
node_comp(found_data_node, node))
1744 found->dir = kRight;
1749 found->dir = kNeither;
1752 critical_node = ETL_NULLPTR;
1755 destroy_data_node(node);
1762 if (found->children[found->dir])
1766 if (kNeither != found->children[found->dir]->weight)
1768 critical_parent_node = found;
1772 found = found->children[found->dir];
1780 found = found->children[found->dir];
1790 if (critical_parent_node == ETL_NULLPTR && critical_node ==
root_node)
1794 else if (critical_parent_node == ETL_NULLPTR && critical_node == position)
1800 if (critical_parent_node != ETL_NULLPTR)
1802 balance_node(critical_parent_node->children[critical_parent_node->dir]);
1823 void next_node(Node*&position)
1828 if (position->children[kRight])
1837 Node* parent = position;
1842 parent = find_parent_node(
root_node, position);
1844 }
while (parent && parent->children[kRight] == position);
1855 void next_node(
const Node*& position)
const
1860 if (position->children[kRight])
1869 const Node* parent = position;
1874 parent = find_parent_node(
root_node, position);
1876 }
while (parent && parent->children[kRight] == position);
1887 void prev_node(Node*&position)
1898 if (position->children[kLeft])
1907 Node* parent = position;
1912 parent = find_parent_node(
root_node, position);
1914 }
while (parent && parent->children[kLeft] == position);
1925 void prev_node(
const Node*& position)
const
1936 if (position->children[kLeft])
1945 const Node* parent = position;
1950 parent = find_parent_node(
root_node, position);
1952 }
while (parent && parent->children[kLeft] == position);
1969 Node* found_parent = ETL_NULLPTR;
1970 Node* found = ETL_NULLPTR;
1971 Node* replace_parent = ETL_NULLPTR;
1972 Node* replace = position;
1973 Node* balance_parent = ETL_NULLPTR;
1978 Data_Node& replace_data_node = imap::data_cast(*replace);
1984 replace->dir = kLeft;
1986 else if (
node_comp(replace_data_node, key))
1989 replace->dir = kRight;
1994 replace->dir = replace->children[kLeft] ? kLeft : kRight;
1997 found_parent = replace_parent;
2002 if (replace->children[replace->dir] == ETL_NULLPTR)
2012 if ((replace->weight == kNeither) ||
2013 (replace->weight == (1 - replace->dir) &&
2014 replace->children[1 - replace->dir]->weight == kNeither))
2017 balance_parent = replace_parent;
2022 replace_parent = replace;
2023 replace = replace->children[replace->dir];
2032 if (balance->children[balance->dir] == ETL_NULLPTR)
2037 if (balance->weight == kNeither)
2039 balance->weight = 1 - balance->dir;
2041 else if (balance->weight == balance->dir)
2043 balance->weight = kNeither;
2047 int weight = balance->children[1 - balance->dir]->weight;
2049 if (weight == balance->dir)
2052 if (balance_parent == ETL_NULLPTR)
2055 balance->children[1 - balance->dir]->children[balance->dir]->weight);
2059 rotate_3node(balance_parent->children[balance_parent->dir], 1 - balance->dir,
2060 balance->children[1 - balance->dir]->children[balance->dir]->weight);
2065 else if (weight == kNeither)
2068 if (balance_parent == ETL_NULLPTR)
2075 rotate_2node(balance_parent->children[balance_parent->dir], 1 - balance->dir);
2076 balance_parent->children[balance_parent->dir]->weight = balance->dir;
2079 balance->weight = 1 - balance->dir;
2085 if (balance_parent == ETL_NULLPTR)
2091 rotate_2node(balance_parent->children[balance_parent->dir], 1 - balance->dir);
2097 if (balance == found)
2101 found_parent = balance_parent->children[balance_parent->dir];
2103 found_parent->dir = found_parent->children[kLeft] == found ? kLeft : kRight;
2114 balance_parent = balance;
2115 balance = balance->children[balance->dir];
2122 detach_node(found_parent->children[found_parent->dir],
2123 replace_parent->children[replace_parent->dir]);
2141 Data_Node& found_data_node = imap::data_cast(*found);
2147 destroy_data_node(found_data_node);
2160 #if defined(ETL_POLYMORPHIC_MAP) || defined(ETL_POLYMORPHIC_CONTAINERS)
2176 template <
typename TKey,
typename TValue, const
size_t MAX_SIZE_,
typename TCompare = etl::less<TKey> >
2181 static const size_t MAX_SIZE = MAX_SIZE_;
2187 :
etl::
imap<TKey, TValue, TCompare>(node_pool, MAX_SIZE)
2196 :
etl::
imap<TKey, TValue, TCompare>(node_pool, MAX_SIZE)
2204 #if ETL_CPP11_SUPPORTED
2209 :
etl::
imap<TKey, TValue, TCompare>(node_pool, MAX_SIZE)
2215 while (from != other.end())
2217 this->
insert(etl::move(*from++));
2229 template <
typename TIterator>
2230 map(TIterator first, TIterator last)
2231 :
etl::
imap<TKey, TValue, TCompare>(node_pool, MAX_SIZE)
2233 this->
assign(first, last);
2236 #if ETL_CPP11_SUPPORTED && ETL_NOT_USING_STLPORT && ETL_USING_STL
2240 map(std::initializer_list<
typename etl::imap<TKey, TValue, TCompare>::value_type> init)
2241 :
etl::
imap<TKey, TValue, TCompare>(node_pool, MAX_SIZE)
2243 this->
assign(init.begin(), init.end());
2269 #if ETL_CPP11_SUPPORTED
2282 while (from != rhs.end())
2284 this->
insert(etl::move(*from++));
2301 #if ETL_CPP17_SUPPORTED && ETL_NOT_USING_STLPORT && ETL_USING_STL
2302 template <
typename T,
typename... Ts>
2304 ->map<etl::enable_if_t<(etl::is_same_v<T, Ts> && ...),
typename T::first_type>,
2305 typename T::second_type,
2306 1U +
sizeof...(Ts)>;
2316 template <
typename TKey,
typename TMapped,
typename TKeyCompare>
2329 template <
typename TKey,
typename TMapped,
typename TKeyCompare>
2332 return !(lhs == rhs);
2342 template <
typename TKey,
typename TMapped,
typename TKeyCompare>
2345 return etl::lexicographical_compare(lhs.
begin(), lhs.
end(), rhs.
begin(), rhs.
end());
2355 template <
typename TKey,
typename TMapped,
typename TKeyCompare>
2368 template <
typename TKey,
typename TMapped,
typename TKeyCompare>
2371 return !(lhs > rhs);
2381 template <
typename TKey,
typename TMapped,
typename TKeyCompare>
2384 return !(lhs < rhs);
const_iterator
Definition: map.h:702
iterator.
Definition: map.h:580
A templated map implementation that uses a fixed size buffer.
Definition: map.h:2178
map(const map &other)
Copy constructor.
Definition: map.h:2195
~map()
Destructor.
Definition: map.h:2250
map(TIterator first, TIterator last)
Definition: map.h:2230
map()
Default constructor.
Definition: map.h:2186
bitset< MAXN > operator&(const bitset< MAXN > &lhs, const bitset< MAXN > &rhs)
Definition: bitset.h:1157
#define ETL_ASSERT(b, e)
Definition: error_handler.h:290
exception(string_type reason_, string_type file_, numeric_type line_)
Constructor.
Definition: exception.h:67
Definition: exception.h:47
const_reverse_iterator crend() const
Gets the reverse end of the list.
Definition: map.h:905
void detach_node(Node *&position, Node *&replacement)
Detach the node at the position provided.
Definition: map.h:432
ETL_OR_STD::pair< iterator, bool > insert(const_reference value)
Definition: map.h:1098
iterator lower_bound(key_parameter_t key)
Definition: map.h:1261
void erase(iterator position)
Erases the value at the specified position.
Definition: map.h:1015
iterator erase(iterator first, iterator last)
Erases a range of elements.
Definition: map.h:1048
iterator upper_bound(key_parameter_t key)
Definition: map.h:1283
const_iterator find(key_parameter_t key) const
Definition: map.h:1088
void rotate_2node(Node *&position, uint_least8_t dir)
Rotate two nodes at the position provided the to balance the tree.
Definition: map.h:313
mapped_type & at(key_parameter_t key)
Definition: map.h:934
void clear()
Clears the map.
Definition: map.h:975
const Node * find_limit_node(const Node *position, const int8_t dir) const
Definition: map.h:401
bool empty() const
Checks to see if the map is empty.
Definition: map.h:154
bool full() const
Checks to see if the map is full.
Definition: map.h:162
const_iterator end() const
Gets the end of the map.
Definition: map.h:841
iterator erase(const_iterator first, const_iterator last)
Erases a range of elements.
Definition: map.h:1062
size_type count(key_parameter_t key) const
Definition: map.h:985
Node * find_limit_node(Node *position, const int8_t dir) const
Definition: map.h:384
const size_type CAPACITY
The maximum size of the map.
Definition: map.h:454
void initialise()
Initialise the map.
Definition: map.h:1366
imap & operator=(const imap &rhs)
Assignment operator.
Definition: map.h:1302
size_t size_type
The type used for determining the size of map.
Definition: map.h:133
reverse_iterator rend()
Gets the reverse end of the list.
Definition: map.h:881
ETL_OR_STD::pair< const_iterator, const_iterator > equal_range(key_parameter_t key) const
Definition: map.h:1005
void assign(TIterator first, TIterator last)
Definition: map.h:966
void insert(TIterator first, TIterator last)
Definition: map.h:1247
iterator insert(iterator, const_reference value)
Definition: map.h:1149
map_base(size_type max_size_)
The constructor that is called from derived classes.
Definition: map.h:232
const_iterator upper_bound(key_parameter_t key) const
Definition: map.h:1294
key_compare key_comp() const
How to compare two key elements.
Definition: map.h:1339
const mapped_type & at(key_parameter_t key) const
Definition: map.h:949
size_type capacity() const
Definition: map.h:171
const_iterator lower_bound(key_parameter_t key) const
Definition: map.h:1272
~imap()
Destructor.
Definition: map.h:2167
etl::parameter_type< TKey >::type key_parameter_t
Defines the key value parameter type.
Definition: map.h:516
const_iterator cbegin() const
Gets the beginning of the map.
Definition: map.h:849
const_reverse_iterator rbegin() const
Gets the reverse beginning of the list.
Definition: map.h:873
Node * root_node
The node that acts as the map root.
Definition: map.h:455
size_type size() const
Gets the size of the map.
Definition: map.h:138
const_iterator cend() const
Gets the end of the map.
Definition: map.h:857
mapped_type & operator[](key_parameter_t key)
Definition: map.h:915
size_type max_size() const
Gets the maximum possible size of the map.
Definition: map.h:146
ETL_OR_STD::pair< iterator, iterator > equal_range(key_parameter_t key)
Definition: map.h:994
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.
Definition: map.h:343
iterator begin()
Gets the beginning of the map.
Definition: map.h:817
size_t available() const
Definition: map.h:180
const_reverse_iterator crbegin() const
Gets the reverse beginning of the list.
Definition: map.h:897
iterator find(key_parameter_t key)
Definition: map.h:1078
iterator end()
Gets the end of the map.
Definition: map.h:833
const_reverse_iterator rend() const
Gets the reverse end of the list.
Definition: map.h:889
reverse_iterator rbegin()
Gets the reverse beginning of the list.
Definition: map.h:865
iterator erase(const_iterator position)
Erases the value at the specified position.
Definition: map.h:1024
size_type current_size
The number of the used nodes.
Definition: map.h:453
~map_base()
Destructor.
Definition: map.h:243
value_compare value_comp() const
How to compare two value elements.
Definition: map.h:1347
imap(etl::ipool &node_pool, size_t max_size_)
Constructor.
Definition: map.h:1357
void attach_node(Node *&position, Node &node)
Attach the provided node to the position provided.
Definition: map.h:417
iterator insert(const_iterator, const_reference value)
Definition: map.h:1197
const_iterator begin() const
Gets the beginning of the map.
Definition: map.h:825
bool node_comp(const Data_Node &node1, const Data_Node &node2) const
How to compare node elements.
Definition: map.h:521
void balance_node(Node *&critical_node)
Balance the critical node at the position provided as needed.
Definition: map.h:250
Definition: absolute.h:37
bool operator>(const etl::array< T, SIZE > &lhs, const etl::array< T, SIZE > &rhs)
Definition: array.h:633
bool operator>=(const etl::array< T, SIZE > &lhs, const etl::array< T, SIZE > &rhs)
Definition: array.h:645
bool operator!=(const etl::array< T, SIZE > &lhs, const etl::array< T, SIZE > &rhs)
Definition: array.h:594
void swap(etl::array< T, SIZE > &lhs, etl::array< T, SIZE > &rhs)
Template deduction guides.
Definition: array.h:570
bool operator==(const etl::array< T, SIZE > &lhs, const etl::array< T, SIZE > &rhs)
Definition: array.h:582
bool operator==(const etl::imap< TKey, TMapped, TKeyCompare > &lhs, const etl::imap< TKey, TMapped, TKeyCompare > &rhs)
Template deduction guides.
Definition: map.h:2317
bool operator<(const etl::array< T, SIZE > &lhs, const etl::array< T, SIZE > &rhs)
Definition: array.h:606
bool operator<=(const etl::array< T, SIZE > &lhs, const etl::array< T, SIZE > &rhs)
Definition: array.h:621
bool operator!=(const etl::imap< TKey, TMapped, TKeyCompare > &lhs, const etl::imap< TKey, TMapped, TKeyCompare > &rhs)
Definition: map.h:2330
The data node element in the map.
Definition: map.h:501
iterator
Definition: iterator.h:422
The node element in the map.
Definition: map.h:198
void mark_as_leaf()
Marks the node as a leaf.
Definition: map.h:216
Node()
Constructor.
Definition: map.h:202
etl::conditional< etl::is_fundamental< T >::value||etl::is_pointer< T >::value, T, const T & >::type type
By default fundamental and pointer types are passed by value.
Definition: parameter_type.h:48