Range adaptor that indexes the elements of a range using another index range.
More...
|
|
constexpr | pick_view ()=default |
| | Default constructor.
|
| template<detray::ranges::range range_t, detray::ranges::range sequence_t> |
| constexpr | pick_view (range_t &&range, sequence_t &&seq) |
| | Select elements of range using the indices in seq.
|
| constexpr auto | back () noexcept |
| constexpr auto | begin () -> iterator |
| constexpr auto | begin () const -> iterator |
| constexpr auto | data () -> typename iterator_t::value_type * |
| constexpr auto | data () const -> const typename iterator_t::value_type * |
| constexpr auto | end () -> iterator |
| constexpr auto | front () noexcept |
| constexpr auto | operator[] (const dindex i) const |
| | Return the selected index and element at position i.
|
| constexpr auto | size () const noexcept |
| 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.
|
template<std::input_iterator range_itr_t, std::input_iterator sequence_itr_t>
class detray::ranges::pick_view< range_itr_t, sequence_itr_t >
Range adaptor that indexes the elements of a range using another index range.
- Template Parameters
-
| range_itr_t | the iterator type of the enumerated range |
| sequence_itr_t | range of indices. |
- Note
- Does not take ownership of the range it operates on. Its lifetime needs to be guaranteed throughout iteration or between iterations with the same enumerate instance.
-
Is not fit for lazy evaluation.