Function malachite_base::unions::random::random_union2s
source · [−]pub fn random_union2s<X, I: Iterator<Item = X>, Y, J: Iterator<Item = Y>>(
seed: Seed,
xs_gen: &dyn Fn(Seed) -> I,
ys_gen: &dyn Fn(Seed) -> J
) -> RandomUnion2s<X, I, Y, J>ⓘNotable traits for RandomUnion2s<X, I, Y, J>impl<X, I: Iterator<Item = X>, Y, J: Iterator<Item = Y>> Iterator for RandomUnion2s<X, I, Y, J> type Item = Union2<X, Y>;
Expand description
This documentation applies not only to random_union2s
, but also to random_union3s
,
random_union4s
, and so on. See random_unions
for more information.
Generates random $n$-unions with elements from $n$ iterators.
The probability of a particular $n$-union being generated is the probability of its element divided by $n$.
xs
, ys
, zs
, … must be infinite.
Examples
See here.