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 &>
auto | ranges::sample (I first, S last, O out, iter_difference_t< O > const n, Gen &&gen=detail::get_random_engine()) -> sample_result< I, O > 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 >)
| function template `sample`
template<typename I , typename S , typename ORng , typename Gen = detail::default_random_engine &>

auto

ranges::sample (I first, S last, ORng &&out, Gen &&gen=detail::get_random_engine()) -> sample_result< I, safe_iterator_t< ORng >> 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 >)

template<typename Rng , typename O , typename Gen = detail::default_random_engine &>
auto | ranges::sample (Rng &&rng, O out, iter_difference_t< O > const n, Gen &&gen=detail::get_random_engine()) -> sample_result< safe_iterator_t< Rng >, O > 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 >)
template<typename IRng , typename ORng , typename Gen = detail::default_random_engine &>

auto

ranges::sample (IRng &&rng, ORng &&out, Gen &&gen=detail::get_random_engine()) -> sample_result< safe_iterator_t< IRng >, safe_iterator_t< ORng >> 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 >)