|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Inorder iterator yielding Interval<T> keys. More...
#include <tpl_interval_tree.H>
Public Member Functions | |
| Iterator () noexcept=default | |
| Default constructor. | |
| Iterator (const DynIntervalTree &t) | |
| Construct for a given tree. | |
| bool | has_curr () const noexcept |
| Check if there is a current element. | |
| const Key & | get_curr () const |
| Return the current interval. | |
| const Key & | get_curr_ne () const noexcept |
| Return the current interval (no check). | |
| void | next () |
| Advance to the next element. | |
| void | next_ne () noexcept |
| Advance to the next element (no check). | |
| void | prev () |
| Go back to the previous element. | |
| void | reset_first () noexcept |
| Reset to the first element in traversal order. | |
| void | end () noexcept |
| Move to the position after the last element. | |
| size_t | get_pos () const |
| Return the 0-indexed current position. | |
Private Attributes | |
| Tree::Iterator | it |
Inorder iterator yielding Interval<T> keys.
Satisfies the Aleph iterator protocol (has_curr/get_curr/next).
Definition at line 1410 of file tpl_interval_tree.H.
|
defaultnoexcept |
Default constructor.
|
inline |
Construct for a given tree.
| [in] | t | tree to iterate over. |
Definition at line 1421 of file tpl_interval_tree.H.
|
inlinenoexcept |
Move to the position after the last element.
| none |
Definition at line 1469 of file tpl_interval_tree.H.
References Aleph::BinNodeInfixIterator< Node >::end(), and Aleph::DynIntervalTree< T, Compare >::Iterator::it.
|
inline |
Return the current interval.
| ah_invalid_argument | if no current element exists. |
Definition at line 1432 of file tpl_interval_tree.H.
References Aleph::BinNodeInfixIterator< Node >::get_curr(), Aleph::DynIntervalTree< T, Compare >::Iterator::it, and KEY.
|
inlinenoexcept |
Return the current interval (no check).
| none |
Definition at line 1441 of file tpl_interval_tree.H.
References Aleph::BinNodeInfixIterator< Node >::get_curr_ne(), Aleph::DynIntervalTree< T, Compare >::Iterator::it, and KEY.
|
inline |
Return the 0-indexed current position.
| ah_invalid_argument | if no current element. |
Definition at line 1475 of file tpl_interval_tree.H.
References Aleph::BinNodeInfixIterator< Node >::get_pos(), and Aleph::DynIntervalTree< T, Compare >::Iterator::it.
|
inlinenoexcept |
Check if there is a current element.
Definition at line 1426 of file tpl_interval_tree.H.
References Aleph::BinNodeInfixIterator< Node >::has_curr(), and Aleph::DynIntervalTree< T, Compare >::Iterator::it.
|
inline |
Advance to the next element.
| ah_invalid_argument | if already at end. |
Definition at line 1449 of file tpl_interval_tree.H.
References Aleph::DynIntervalTree< T, Compare >::Iterator::it, and Aleph::BinNodeInfixIterator< Node >::next().
|
inlinenoexcept |
Advance to the next element (no check).
| none |
Definition at line 1454 of file tpl_interval_tree.H.
References Aleph::DynIntervalTree< T, Compare >::Iterator::it, and Aleph::BinNodeInfixIterator< Node >::next_ne().
|
inline |
Go back to the previous element.
| ah_invalid_argument | if already at the beginning. |
Definition at line 1459 of file tpl_interval_tree.H.
References Aleph::DynIntervalTree< T, Compare >::Iterator::it.
|
inlinenoexcept |
Reset to the first element in traversal order.
| none |
Definition at line 1464 of file tpl_interval_tree.H.
References Aleph::DynIntervalTree< T, Compare >::Iterator::it, and Aleph::BinNodeInfixIterator< Node >::reset_first().
|
private |
Definition at line 1412 of file tpl_interval_tree.H.
Referenced by Aleph::DynIntervalTree< T, Compare >::Iterator::end(), Aleph::DynIntervalTree< T, Compare >::Iterator::get_curr(), Aleph::DynIntervalTree< T, Compare >::Iterator::get_curr_ne(), Aleph::DynIntervalTree< T, Compare >::Iterator::get_pos(), Aleph::DynIntervalTree< T, Compare >::Iterator::has_curr(), Aleph::DynIntervalTree< T, Compare >::Iterator::next(), Aleph::DynIntervalTree< T, Compare >::Iterator::next_ne(), Aleph::DynIntervalTree< T, Compare >::Iterator::prev(), and Aleph::DynIntervalTree< T, Compare >::Iterator::reset_first().