Function malachite_base::tuples::random::random_pairs_from_single
source · [−]pub const fn random_pairs_from_single<I: Iterator>(
xs: I
) -> RandomPairsFromSingle<I>ⓘNotable traits for RandomPairsFromSingle<I>impl<I: Iterator> Iterator for RandomPairsFromSingle<I> type Item = (I::Item, I::Item);
Expand description
This documentation applies not only to random_pairs_from_single
, but also to
random_triples_from_single
, random_quadruples_from_single
, and so on. See
random_tuples
for more information.
Generates random $n$-tuples using elements from a single iterator.
The probability of a particular $n$-tuple being generated is the product of the probabilities of each of its elements.
xs
must be infinite.
Examples
See here.