TRIQS/itertools 1.3.0
C++ range library
Loading...
Searching...
No Matches
itertools::multiplied< Rs >

#include <itertools/product.hpp>

Detailed Description

template<typename... Rs>
struct itertools::multiplied< Rs >

Represents a cartesian product of ranges.

See itertools::product(Rs &&...rgs) for more details.

Template Parameters
RsRange types.

Definition at line 140 of file product.hpp.

Public Types

using const_iterator = prod_iter<std::tuple<decltype(std::cend(std::declval<Rs &>()))...>, decltype(std::cbegin(std::declval<Rs &>()))...>
 Const iterator type the product range.
 
using iterator = prod_iter<std::tuple<decltype(std::end(std::declval<Rs &>()))...>, decltype(std::begin(std::declval<Rs &>()))...>
 Iterator type of the product range.
 

Public Member Functions

template<typename... Us>
 multiplied (Us &&...rgs)
 Constructs a cartesian product (multiplied) range from the given ranges.
 
const_iterator begin () const noexcept
 Const overload of begin().
 
iterator begin () noexcept
 Beginning of the product range.
 
const_iterator cbegin () const noexcept
 Const version of begin().
 
auto cend () const noexcept
 Const version of end().
 
auto end () const noexcept
 Const overload of end().
 
auto end () noexcept
 End of the product range.
 
bool operator== (multiplied const &) const =default
 Default equal-to operator.
 

Public Attributes

std::tuple< Rs... > tu
 Tuple containing the original ranges.
 

Constructor & Destructor Documentation

◆ multiplied()

template<typename... Rs>
template<typename... Us>
itertools::multiplied< Rs >::multiplied ( Us &&... rgs)
inline

Constructs a cartesian product (multiplied) range from the given ranges.

Template Parameters
UsRange types.
Parameters
rgsRanges to be multiplied.

Definition at line 156 of file product.hpp.

Member Function Documentation

◆ begin()

template<typename... Rs>
iterator itertools::multiplied< Rs >::begin ( )
inlinenodiscardnoexcept

Beginning of the product range.

Returns
itertools::prod_iter representing the beginning of the product range.

Definition at line 177 of file product.hpp.

◆ end()

template<typename... Rs>
auto itertools::multiplied< Rs >::end ( )
inlinenodiscardnoexcept

End of the product range.

Returns
itertools::sentinel_t containing the end iterator of the first original range, i.e. std::end(std::get<0>(tu)).

Definition at line 189 of file product.hpp.


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