Range-v3 Range algorithms, views, and actions for the Standard Library |

Public Member Functions | List of all members
ranges::views::sample_base_fn Struct Reference

## Description

Returns a random sample of a range of length `size(range)`.

Inheritance diagram for ranges::views::sample_base_fn:

## Public Member Functions
template<typename Rng , typename URNG = detail::default_random_engine>
sample_view< all_t< Rng >, URNG > | operator() (Rng &&rng, range_difference_t< Rng > sample_size, URNG &generator=detail::get_random_engine()) const

## Member Function Documentation

## ◆ operator()()

template<typename Rng , typename URNG = detail::default_random_engine>

sample_view<all_t<Rng>, URNG> ranges::views::sample_base_fn::operator() | ( | Rng && | rng,
|  | range_difference_t< Rng > | sample_size,
|  | URNG & | generator = `detail::get_random_engine()`
| ) |  | const

Precondition
  requires `viewable_range<Rng> && input_range<Rng> && uniform_random_bit_generator<URNG> && convertible_to<invoke_result_t<URNG &>, range_difference_t<Rng>> && (sized_range<Rng> || sized_sentinel_for<sentinel_t<Rng>, iterator_t<Rng>> || forward_range<Rng>)` //