![]() |
aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
|
AVL binary search tree safe (w.r.t. More...
#include <agrum/base/core/AVLTree.h>
Public Types | |
| using | iterator_category = std::bidirectional_iterator_tag |
| Types for STL compliance. | |
| using | value_type = Val |
| Types for STL compliance. | |
| using | reference = value_type& |
| Types for STL compliance. | |
| using | const_reference = const value_type& |
| Types for STL compliance. | |
| using | pointer = value_type* |
| Types for STL compliance. | |
| using | const_pointer = const value_type* |
| Types for STL compliance. | |
Public Member Functions | |
Constructors / Destructors | |
| AVLTreeIteratorSafe (AVLTree< Val, Cmp > &tree, const bool begin=true) | |
| constructor for begin safe iterators | |
| AVLTreeIteratorSafe (const AVLTreeIteratorSafe< Val, Cmp > &from) | |
| copy constructor | |
| AVLTreeIteratorSafe (AVLTreeIteratorSafe< Val, Cmp > &&from) | |
| move constructor | |
| ~AVLTreeIteratorSafe () noexcept | |
| destructor | |
Operators | |
| AVLTreeIteratorSafe< Val, Cmp > & | operator= (const AVLTreeIteratorSafe< Val, Cmp > &from) |
| copy operator | |
| AVLTreeIteratorSafe< Val, Cmp > & | operator= (AVLTreeIteratorSafe< Val, Cmp > &&from) |
| move operator | |
| bool | operator== (const AVLTreeIteratorSafe< Val, Cmp > &from) const |
| indicates whether two iterator point to the same element | |
| bool | operator!= (const AVLTreeIteratorSafe< Val, Cmp > &from) const |
| indicates whether two iterator point to different element | |
| AVLTreeIteratorSafe< Val, Cmp > & | operator++ () noexcept |
| move to the next element in the tree | |
| AVLTreeIteratorSafe< Val, Cmp > & | operator+= (const Size k) noexcept |
| move to the next k elements | |
| AVLTreeIteratorSafe< Val, Cmp > & | operator-- () noexcept |
| move to the preceding element in the tree | |
| AVLTreeIteratorSafe< Val, Cmp > & | operator-= (const Size k) noexcept |
| move to the preceding k element | |
Protected Types | |
| using | AVLNode |
| the type of the nodes of the tree | |
Protected Member Functions | |
| AVLNode * | nextNode_ (AVLNode *node) const noexcept |
| computes the node to go to when applying operator++ | |
| AVLNode * | precedingNode_ (AVLNode *node) const noexcept |
| computes the node to go to when applying operator-- | |
| void | unregisterTree_ () noexcept |
| make the iterator point to nothing | |
| void | pointToEndRend_ () noexcept |
| force the iterator to point to end/rend | |
Operators | |
| bool | operator== (const AVLTreeIterator< Val, std::less< Val > > &from) const |
| indicates whether two iterator point to the same element | |
| bool | operator!= (const AVLTreeIterator< Val, std::less< Val > > &from) const |
| indicates whether two iterator point to different element | |
| const_reference | operator* () const |
| returns the element pointed to by the iterator | |
Protected Attributes | |
| friend | AVLTree< Val, Cmp > |
| allow AVL trees to access the content of the iterators | |
| AVLTree< Val, std::less< Val > > * | tree_ |
| the tree the iterator points to | |
| AVLNode * | node_ |
| the AVLNode the iterator points to | |
| AVLNode * | next_node_ |
| the next node to go to when applying operator++ | |
| AVLNode * | preceding_node_ |
| the preceding node to go to when applying operator-- | |
AVL binary search tree safe (w.r.t.
erasures) iterator
| Val | The type of the elements stored into the tree. |
| Cmp | The function used for sorting the elements. queues. |
|
protectedinherited |
| using gum::AVLTreeIteratorSafe< Val, Cmp >::const_pointer = const value_type* |
| using gum::AVLTreeIteratorSafe< Val, Cmp >::const_reference = const value_type& |
| using gum::AVLTreeIteratorSafe< Val, Cmp >::iterator_category = std::bidirectional_iterator_tag |
| using gum::AVLTreeIteratorSafe< Val, Cmp >::pointer = value_type* |
| using gum::AVLTreeIteratorSafe< Val, Cmp >::reference = value_type& |
| using gum::AVLTreeIteratorSafe< Val, Cmp >::value_type = Val |
|
explicit |
constructor for begin safe iterators
| tree | the AVL tree which parses the iterator |
| begin | if true, the iterator points to the highest value in the tree, else it points to the lowest value |
| gum::AVLTreeIteratorSafe< Val, Cmp >::AVLTreeIteratorSafe | ( | const AVLTreeIteratorSafe< Val, Cmp > & | from | ) |
copy constructor
| gum::AVLTreeIteratorSafe< Val, Cmp >::AVLTreeIteratorSafe | ( | AVLTreeIteratorSafe< Val, Cmp > && | from | ) |
move constructor
|
noexcept |
destructor
|
protectednoexceptinherited |
computes the node to go to when applying operator++
|
inherited |
indicates whether two iterator point to different element
| bool gum::AVLTreeIteratorSafe< Val, Cmp >::operator!= | ( | const AVLTreeIteratorSafe< Val, Cmp > & | from | ) | const |
indicates whether two iterator point to different element
|
inherited |
returns the element pointed to by the iterator
| NotFound | is raised if the iterator does not point to any element |
|
noexcept |
move to the next element in the tree
|
noexcept |
move to the next k elements
|
noexcept |
move to the preceding element in the tree
|
noexcept |
move to the preceding k element
| AVLTreeIteratorSafe< Val, Cmp > & gum::AVLTreeIteratorSafe< Val, Cmp >::operator= | ( | AVLTreeIteratorSafe< Val, Cmp > && | from | ) |
move operator
| AVLTreeIteratorSafe< Val, Cmp > & gum::AVLTreeIteratorSafe< Val, Cmp >::operator= | ( | const AVLTreeIteratorSafe< Val, Cmp > & | from | ) |
copy operator
|
inherited |
indicates whether two iterator point to the same element
| bool gum::AVLTreeIteratorSafe< Val, Cmp >::operator== | ( | const AVLTreeIteratorSafe< Val, Cmp > & | from | ) | const |
indicates whether two iterator point to the same element
|
protectednoexceptinherited |
force the iterator to point to end/rend
|
protectednoexceptinherited |
computes the node to go to when applying operator--
|
protectednoexceptinherited |
make the iterator point to nothing
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |