Loading...
Searching...
No Matches
sample.hpp File Reference

## Typedefs

template<typename I , typename O >
using | ranges::sample_result = detail::in_out_result< I, O >

## Functions

template<typename I , typename S , typename O , typename Gen = detail::default_random_engine &> requires input_iterator<I> && sentinel_for<S, I> && weakly_incrementable<O> && indirectly_copyable<I, O> && uniform_random_bit_generator<std::remove_reference_t<Gen>> && (random_access_iterator<O> || forward_iterator<I> || sized_sentinel_for<S, I>)
sample_result< I, O > | ranges::sample (I first, S last, O out, iter_difference_t< O > const n, Gen &&gen=detail::get_random_engine())
| function template `sample`

template<typename I , typename S , typename ORng , typename Gen = detail::default_random_engine &>
requires input_iterator<I> && sentinel_for<S, I> && weakly_incrementable<iterator_t<ORng>> && indirectly_copyable<I, iterator_t<ORng>> && uniform_random_bit_generator<std::remove_reference_t<Gen>> && (forward_range<ORng> || sized_range<ORng>) && (random_access_iterator<iterator_t<ORng>> || forward_iterator<I> || sized_sentinel_for<S, I>)

sample_result< I, borrowed_iterator_t< ORng > > | ranges::sample (I first, S last, ORng &&out, Gen &&gen=detail::get_random_engine())
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<typename IRng , typename ORng , typename Gen = detail::default_random_engine &> requires input_range<IRng> && range<ORng> && indirectly_copyable<iterator_t<IRng>, iterator_t<ORng>> && uniform_random_bit_generator<std::remove_reference_t<Gen>> && (random_access_iterator<iterator_t<ORng>> || forward_range<IRng> || sized_range<IRng>) && (forward_range<ORng> || sized_range<ORng>)
sample_result< borrowed_iterator_t< IRng >, borrowed_iterator_t< ORng > > | ranges::sample (IRng &&rng, ORng &&out, Gen &&gen=detail::get_random_engine())
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<typename Rng , typename O , typename Gen = detail::default_random_engine &> requires input_range<Rng> && weakly_incrementable<O> && indirectly_copyable<iterator_t<Rng>, O> && uniform_random_bit_generator<std::remove_reference_t<Gen>> && (random_access_iterator<O> || forward_range<Rng> || sized_range<Rng>)
sample_result< borrowed_iterator_t< Rng >, O > | ranges::sample (Rng &&rng, O out, iter_difference_t< O > const n, Gen &&gen=detail::get_random_engine())
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.