|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Lazy view over multiple zipped STL containers. More...
#include <ah-stl-zip.H>
Public Types | |
| using | iterator = StlZipIterator< std::decay_t< Containers >... > |
| using | const_iterator = iterator |
| using | value_type = typename iterator::value_type |
Public Member Functions | |
| constexpr | StlZipView (const Containers &... cs) |
| Construct view from containers. | |
| constexpr iterator | begin () const |
| Get iterator to beginning. | |
| constexpr iterator | end () const |
| Get iterator to end. | |
| constexpr bool | empty () const |
| Check if view is empty. | |
| size_t | size () const |
| Get number of tuples (minimum size of all containers). | |
Private Attributes | |
| std::tuple< const std::decay_t< Containers > &... > | containers_ |
Lazy view over multiple zipped STL containers.
This class provides a range interface for zipping containers without materializing the result. It can be used with range-based for loops and integrates with STL algorithms.
Unlike std::vector of tuples approaches, this view allocates zero additional memory beyond storing references to the original containers.
| Containers | Types of containers being zipped. |
Definition at line 323 of file ah-stl-zip.H.
| using Aleph::StlZipView< Containers >::const_iterator = iterator |
Definition at line 329 of file ah-stl-zip.H.
| using Aleph::StlZipView< Containers >::iterator = StlZipIterator<std::decay_t<Containers>...> |
Definition at line 328 of file ah-stl-zip.H.
| using Aleph::StlZipView< Containers >::value_type = typename iterator::value_type |
Definition at line 330 of file ah-stl-zip.H.
|
inlineexplicitconstexpr |
Construct view from containers.
| cs | References to containers to zip. |
Definition at line 336 of file ah-stl-zip.H.
|
inlineconstexpr |
Get iterator to beginning.
Definition at line 343 of file ah-stl-zip.H.
References Aleph::StlZipView< Containers >::containers_, and Aleph::maps().
Referenced by Aleph::StlZipView< Containers >::empty(), and Aleph::StlZipView< Containers >::size().
|
inlineconstexpr |
Check if view is empty.
true if any container is empty. Definition at line 367 of file ah-stl-zip.H.
References Aleph::StlZipView< Containers >::begin(), Aleph::StlZipIterator< Containers >::has_curr(), and Aleph::maps().
|
inlineconstexpr |
Get iterator to end.
Definition at line 355 of file ah-stl-zip.H.
References Aleph::StlZipView< Containers >::containers_, and Aleph::maps().
|
inline |
Get number of tuples (minimum size of all containers).
Definition at line 377 of file ah-stl-zip.H.
References Aleph::StlZipView< Containers >::begin(), Aleph::count(), and Aleph::StlZipIterator< Containers >::has_curr().
|
private |
Definition at line 325 of file ah-stl-zip.H.
Referenced by Aleph::StlZipView< Containers >::begin(), and Aleph::StlZipView< Containers >::end().