Template Struct sample_view

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:

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.