|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Iterator that zips two other iterators. More...
#include <ahFunctional.H>
Public Member Functions | |
| Pair_Iterator (Itor1 i1, Itor2 i2) | |
| Construct from two iterators. | |
| template<class C1 , class C2 > | |
| Pair_Iterator (const C1 &c1, const C2 &c2) | |
| Construct from two containers. | |
| bool | has_curr () const noexcept |
| Check if both iterators have current elements. | |
| bool | has_curr1 () const noexcept |
| Check if first iterator has current element. | |
| bool | has_curr2 () const noexcept |
| Check if second iterator has current element. | |
| auto | get_curr () const |
| Get current pair (bounds-checked). | |
| auto | get_curr_ne () const noexcept |
| Get current pair (no bounds check). | |
| void | next () |
| Advance both iterators (bounds-checked). | |
| void | next_ne () noexcept |
| Advance both iterators (no bounds check). | |
| bool | was_traversed () const noexcept |
| Check if both iterators were completely traversed. | |
Private Attributes | |
| Itor1 | it1 |
| Itor2 | it2 |
Iterator that zips two other iterators.
Synchronizes two iterators so they advance together. Produces pairs of elements from both iterators. Useful for iterating over two containers in lockstep.
| Itor1 | Type of first iterator. |
| Itor2 | Type of second iterator (defaults to Itor1). |
Definition at line 1474 of file ahFunctional.H.
|
inline |
Construct from two iterators.
Definition at line 1482 of file ahFunctional.H.
Construct from two containers.
| c1 | First container. |
| c2 | Second container. |
Definition at line 1489 of file ahFunctional.H.
|
inline |
Get current pair (bounds-checked).
| std::overflow_error | if either iterator is exhausted. |
Definition at line 1507 of file ahFunctional.H.
Referenced by TEST_F().
|
inlinenoexcept |
Get current pair (no bounds check).
Definition at line 1516 of file ahFunctional.H.
|
inlinenoexcept |
Check if both iterators have current elements.
Definition at line 1495 of file ahFunctional.H.
|
inlinenoexcept |
Check if first iterator has current element.
Definition at line 1498 of file ahFunctional.H.
|
inlinenoexcept |
Check if second iterator has current element.
Definition at line 1501 of file ahFunctional.H.
|
inline |
Advance both iterators (bounds-checked).
| std::overflow_error | if either iterator is exhausted. |
Definition at line 1524 of file ahFunctional.H.
|
inlinenoexcept |
Advance both iterators (no bounds check).
Definition at line 1533 of file ahFunctional.H.
|
inlinenoexcept |
Check if both iterators were completely traversed.
Definition at line 1543 of file ahFunctional.H.
Definition at line 1476 of file ahFunctional.H.
Definition at line 1477 of file ahFunctional.H.