Template Struct sample_view
Defined in File sample.hpp
Nested Relationships
Nested Types
Inheritance Relationships
Base Type
public ranges::view_facade< sample_view< Range, Distribution, typename ranges::detail::default_random_engine >, ranges::infinite >
Struct Documentation
-
template<class Range, class Distribution, class URNG = typename ranges::detail::default_random_engine>
struct sample_view : public ranges::view_facade<sample_view<Range, Distribution, typename ranges::detail::default_random_engine>, ranges::infinite> Implementation of the sample view.
- Template Parameters:
Range – A random access and sized range.
Distribution – A random number distribution that satisfies the RandomNumberDistribution.
URNG – A random number generator that satisfies the UniformRandomBitGenerator requirements.
Public Functions
-
sample_view() = default
Default constructor.
-
inline constexpr sample_view(Range range, Distribution distribution, URNG &engine = ranges::detail::get_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.