Implementation of the sample view.
More...
#include <sample.hpp>
|
struct | cursor |
| Cursor class that handles the iteration logic. More...
|
|
|
| sample_view ()=default |
| Default constructor. More...
|
|
constexpr | sample_view (Range range, Distribution distribution, URNG &engine=ranges::detail::get_random_engine()) |
| Construct the view from an existing range. More...
|
|
|
constexpr auto | begin_cursor () |
| Return the cursor for the begin iterator. More...
|
|
constexpr auto | compute_offset () |
| Return a new offset value to advance the current iterator. More...
|
|
constexpr auto | end_cursor () const noexcept |
| Return an unreachable sentinel since this is an infinite range. More...
|
|
template<class Range, class Distribution, class URNG = typename ranges::detail::default_random_engine>
struct beluga::views::detail::sample_view< Range, Distribution, URNG >
Implementation of the sample view.
- Template Parameters
-
Definition at line 47 of file sample.hpp.
◆ sample_view() [1/2]
template<class Range , class Distribution , class URNG = typename ranges::detail::default_random_engine>
◆ sample_view() [2/2]
template<class Range , class Distribution , class URNG = typename ranges::detail::default_random_engine>
Construct the view from an existing range.
- Parameters
-
range | The range to be adapted. |
distribution | The random number distribution to use to sample elements. |
engine | The random number generator object. |
Definition at line 58 of file sample.hpp.
◆ begin_cursor()
template<class Range , class Distribution , class URNG = typename ranges::detail::default_random_engine>
Return the cursor for the begin iterator.
Definition at line 96 of file sample.hpp.
◆ compute_offset()
template<class Range , class Distribution , class URNG = typename ranges::detail::default_random_engine>
Return a new offset value to advance the current iterator.
Definition at line 102 of file sample.hpp.
◆ end_cursor()
template<class Range , class Distribution , class URNG = typename ranges::detail::default_random_engine>
|
inlineconstexprprivatenoexcept |
Return an unreachable sentinel since this is an infinite range.
Definition at line 99 of file sample.hpp.
◆ distribution_
template<class Range , class Distribution , class URNG = typename ranges::detail::default_random_engine>
◆ engine_
template<class Range , class Distribution , class URNG = typename ranges::detail::default_random_engine>
◆ range_
template<class Range , class Distribution , class URNG = typename ranges::detail::default_random_engine>
The documentation for this struct was generated from the following file: