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

#include <itertools/product.hpp>

Detailed Description

template<typename R>
struct itertools::multiplied_vec< R >

Represents a cartesian product of homogeneous ranges stored in a vector.

See itertools::product_vec(std::vector<R> const &) for more details.

Template Parameters
RRange type.

Definition at line 305 of file product.hpp.

Public Types

using const_iterator = prod_iter_vec<decltype(std::cbegin(std::declval<R &>()))>
 Const iterator type the product range.
using iterator = prod_iter_vec<decltype(std::begin(std::declval<R &>()))>
 Iterator type of the product range.

Public Member Functions

 multiplied_vec (std::vector< R > rgs)
 Constructs a cartesian product (multiplied_vec) range from a vector of 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_vec const &) const =default
 Default equal-to operator.

Public Attributes

std::vector< R > tu
 Vector containing the original ranges.

Constructor & Destructor Documentation

◆ multiplied_vec()

template<typename R>
itertools::multiplied_vec< R >::multiplied_vec ( std::vector< R > rgs)
inlineexplicit

Constructs a cartesian product (multiplied_vec) range from a vector of ranges.

Parameters
rgsVector of ranges to be multiplied.

Definition at line 320 of file product.hpp.

Member Function Documentation

◆ begin()

template<typename R>
iterator itertools::multiplied_vec< R >::begin ( )
inlinenodiscardnoexcept

Beginning of the product range.

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

Definition at line 329 of file product.hpp.

◆ end()

template<typename R>
auto itertools::multiplied_vec< R >::end ( )
inlinenodiscardnoexcept

End of the product range.

Returns
itertools::sentinel_t containing the end iterator of the first original range, i.e. std::end(tu[0]). For empty products, returns a default-constructed sentinel (unused, as done flag is checked instead).

Definition at line 360 of file product.hpp.


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