ACTS
Experiment-independent tracking
Loading...
Searching...
No Matches
detray::ranges::views::cartesian_product< range_ts > Struct Template Reference

interface type to construct a cartesian_product_view with CTAD More...

#include <detray/utils/ranges/cartesian_product.hpp>

Inheritance diagram for detray::ranges::views::cartesian_product< range_ts >:
[legend]
Collaboration diagram for detray::ranges::views::cartesian_product< range_ts >:
[legend]

Public Types

using base_type = ranges::cartesian_product_view<range_ts...>
 Base Cartesian-product view.
Public Types inherited from detray::ranges::cartesian_product_view< range_ts... >
using iterator_coll_t
 Tuple of the begin or end iterator for each input range.
using iterator_t
 Iterator that advances through the Cartesian product.
using value_type
 Tuple of references to the current element of each input range.

Public Member Functions

template<detray::ranges::range... deduced_range_ts>
requires ((sizeof...(deduced_range_ts) > 1) || ((!std::same_as<cartesian_product, deduced_range_ts>) && ...))
constexpr cartesian_product (deduced_range_ts &&...ranges)
 Construct a Cartesian-product adaptor from the ranges to combine.
Public Member Functions inherited from detray::ranges::cartesian_product_view< range_ts... >
constexpr cartesian_product_view ()=default
 Default constructor.
constexpr cartesian_product_view (deduced_range_ts... ranges)
 Construct from a pack of ranges.
constexpr auto begin () const -> iterator_t
constexpr auto data ()
constexpr auto data () const
constexpr auto end () const -> iterator_t
constexpr auto size (std::size_t s=1u) const noexcept -> std::size_t
Public Member Functions inherited from detray::ranges::view_interface< cartesian_product_view< range_ts... > >
constexpr decltype(auto) back () const
 Return a reference to the last element.
constexpr auto data () const
 Return a pointer to the first element, or null for an empty view.
constexpr auto empty () const -> bool
 Check whether the view contains no elements.
constexpr decltype(auto) front () const
 Return a reference to the first element.
constexpr operator bool () const
 Test whether the view contains at least one element.
constexpr decltype(auto) operator[] (const dindex i) const
 Subscript operator that takes detray dindex.
constexpr auto size () const
 Return the number of elements in the view.

Detailed Description

template<detray::ranges::range... range_ts>
struct detray::ranges::views::cartesian_product< range_ts >

interface type to construct a cartesian_product_view with CTAD

Constructor & Destructor Documentation

◆ cartesian_product()

template<detray::ranges::range... range_ts>
template<detray::ranges::range... deduced_range_ts>
requires ((sizeof...(deduced_range_ts) > 1) || ((!std::same_as<cartesian_product, deduced_range_ts>) && ...))
detray::ranges::views::cartesian_product< range_ts >::cartesian_product ( deduced_range_ts &&... ranges)
explicitconstexpr

Construct a Cartesian-product adaptor from the ranges to combine.

Template Parameters
deduced_range_tsinput range types
Parameters
rangesranges whose elements form the product