|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Lazy view over multiple zipped containers (STL or Aleph). More...
#include <ah-zip-utils.H>
Public Types | |
| using | iterator = UniZipIterator< std::decay_t< Containers >... > |
| using | sentinel = UniZipSentinel |
| using | value_type = typename iterator::value_type |
Public Member Functions | |
| UniZipView (const Containers &...cs) | |
| Constructor from containers. | |
| iterator | begin () const |
| Returns an iterator to the beginning. | |
| sentinel | end () const noexcept |
| O(1) end() using sentinel. | |
| bool | empty () const |
| Check if the zipped view is empty. | |
| size_t | size () const |
| Note: O(n) - iterates through all elements to count. | |
Private Attributes | |
| std::tuple< const std::decay_t< Containers > &... > | containers_ |
Lazy view over multiple zipped containers (STL or Aleph).
| Containers | Types of containers being zipped. |
Definition at line 487 of file ah-zip-utils.H.
| using Aleph::UniZipView< Containers >::iterator = UniZipIterator<std::decay_t<Containers>...> |
Definition at line 492 of file ah-zip-utils.H.
| using Aleph::UniZipView< Containers >::sentinel = UniZipSentinel |
Definition at line 493 of file ah-zip-utils.H.
| using Aleph::UniZipView< Containers >::value_type = typename iterator::value_type |
Definition at line 494 of file ah-zip-utils.H.
|
inlineexplicit |
Constructor from containers.
Definition at line 497 of file ah-zip-utils.H.
|
inline |
Returns an iterator to the beginning.
Definition at line 500 of file ah-zip-utils.H.
References Aleph::UniZipView< Containers >::containers_.
Referenced by Aleph::UniZipView< Containers >::empty(), and Aleph::UniZipView< Containers >::size().
|
inline |
Check if the zipped view is empty.
Definition at line 515 of file ah-zip-utils.H.
References Aleph::UniZipView< Containers >::begin(), and Aleph::UniZipIterator< Containers >::has_curr().
|
inlinenoexcept |
O(1) end() using sentinel.
Definition at line 509 of file ah-zip-utils.H.
Referenced by Aleph::UniZipView< Containers >::size().
|
inline |
Note: O(n) - iterates through all elements to count.
Get the number of elements in the zipped view
Definition at line 524 of file ah-zip-utils.H.
References Aleph::UniZipView< Containers >::begin(), Aleph::count(), and Aleph::UniZipView< Containers >::end().
|
private |
Definition at line 489 of file ah-zip-utils.H.
Referenced by Aleph::UniZipView< Containers >::begin().