Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::UniZipView< Containers > Class Template Reference

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)
 
iterator begin () const
 
sentinel end () const noexcept
 O(1) end() using sentinel.
 
bool empty () const
 
size_t size () const
 Note: O(n) - iterates through all elements to count.
 

Private Attributes

std::tuple< const std::decay_t< Containers > &... > containers_
 

Detailed Description

template<typename... Containers>
class Aleph::UniZipView< Containers >

Lazy view over multiple zipped containers (STL or Aleph).

Template Parameters
ContainersTypes of containers being zipped.
Author
Leandro Rabindranath León

Definition at line 370 of file ah-zip-utils.H.

Member Typedef Documentation

◆ iterator

template<typename... Containers>
using Aleph::UniZipView< Containers >::iterator = UniZipIterator<std::decay_t<Containers>...>

Definition at line 375 of file ah-zip-utils.H.

◆ sentinel

template<typename... Containers>
using Aleph::UniZipView< Containers >::sentinel = UniZipSentinel

Definition at line 376 of file ah-zip-utils.H.

◆ value_type

template<typename... Containers>
using Aleph::UniZipView< Containers >::value_type = typename iterator::value_type

Definition at line 377 of file ah-zip-utils.H.

Constructor & Destructor Documentation

◆ UniZipView()

template<typename... Containers>
Aleph::UniZipView< Containers >::UniZipView ( const Containers &...  cs)
inlineexplicit

Definition at line 379 of file ah-zip-utils.H.

Member Function Documentation

◆ begin()

template<typename... Containers>
iterator Aleph::UniZipView< Containers >::begin ( ) const
inline

◆ empty()

template<typename... Containers>
bool Aleph::UniZipView< Containers >::empty ( ) const
inline

◆ end()

template<typename... Containers>
sentinel Aleph::UniZipView< Containers >::end ( ) const
inlinenoexcept

O(1) end() using sentinel.

Definition at line 390 of file ah-zip-utils.H.

Referenced by Aleph::UniZipView< Containers >::size().

◆ size()

template<typename... Containers>
size_t Aleph::UniZipView< Containers >::size ( ) const
inline

Note: O(n) - iterates through all elements to count.

Definition at line 401 of file ah-zip-utils.H.

References Aleph::UniZipView< Containers >::begin(), Aleph::count(), and Aleph::UniZipView< Containers >::end().

Member Data Documentation

◆ containers_

template<typename... Containers>
std::tuple<const std::decay_t<Containers>&...> Aleph::UniZipView< Containers >::containers_
private

Definition at line 372 of file ah-zip-utils.H.

Referenced by Aleph::UniZipView< Containers >::begin().


The documentation for this class was generated from the following file: