|
Embedded Template Library 1.0
|
#include <intrusive_avl_tree.h>
Public Member Functions | |
| iterator & | operator++ () ETL_NOEXCEPT |
| iterator | operator++ (int) ETL_NOEXCEPT |
| iterator & | operator-- () ETL_NOEXCEPT |
| iterator | operator-- (int) ETL_NOEXCEPT |
| pointer | get () const ETL_NOEXCEPT |
| pointer | operator-> () const |
| ETL_EXPLICIT | operator bool () const ETL_NOEXCEPT |
| ETL_NODISCARD bool | has_value () const ETL_NOEXCEPT |
| ETL_NODISCARD int_fast8_t | get_balance_factor () const ETL_NOEXCEPT |
| ETL_NODISCARD iterator | get_parent () const ETL_NOEXCEPT |
| ETL_NODISCARD iterator | get_child (const bool is_right) const ETL_NOEXCEPT |
Friends | |
| class | intrusive_avl_tree |
| class | const_iterator |
| bool | operator== (const iterator &lhs, const iterator &rhs) ETL_NOEXCEPT |
| bool | operator!= (const iterator &lhs, const iterator &rhs) ETL_NOEXCEPT |
Additional Inherited Members | |
| Public Types inherited from etl::iterator< ETL_OR_STD::bidirectional_iterator_tag, value_type > | |
| typedef value_type | value_type |
| typedef ptrdiff_t | difference_type |
| typedef value_type * | pointer |
| typedef value_type & | reference |
| typedef ETL_OR_STD::bidirectional_iterator_tag | iterator_category |
Defines iterator of mutable items of the tree.
Normally, an iterator might...
|
inline |
Gets address of an existing mutable item (if any). Returns nullptr if iterator doesn't reference a real item.
|
inline |
Gets balance factor of tree node. Complexity: O(1). Normally is not needed unless advanced traversal is required. Result: -1, 0 or +1 depending on children tree height difference.
|
inline |
Gets a child node. Complexity: O(1). Normally is not needed unless advanced traversal is required. Result iterator will be valueless (has_value() == false) if there is no such child.
|
inline |
Gets parent node. Complexity: O(1). Normally is not needed unless advanced traversal is required. Result iterator will be valueless (has_value() == false) if there is no parent.
|
inline |
Increments iterator to point to the next ("greater") item. Complexity: amortized O(1), worst-case O(log(N)).
|
inline |
Increments iterator to point to the next ("greater") item. Complexity: amortized O(1), worst-case O(log(N)). Returns original iterator (before the increment).
|
inline |
Decrements iterator to point to the previous ("smaller") item. Complexity: amortized O(1), worst-case O(log(N)).
|
inline |
Decrements iterator to point to the previous ("smaller") item. Complexity: amortized O(1), worst-case O(log(N)). Returns original iterator (before the decrement).
|
inline |
Dereferences an existing mutable item. Could be used only for iterator which has value (has_value() == true). If asserts or exceptions are enabled, throws an etl::intrusive_avl_tree_iterator_exception if iterator doesn't reference a real item.