Function malachite_base::vecs::random::random_vecs_fixed_length_2_inputs
source · [−]pub fn random_vecs_fixed_length_2_inputs<T, I: Iterator<Item = T>, J: Iterator<Item = T>>(
seed: Seed,
xs_gen: &dyn Fn(Seed) -> I,
ys_gen: &dyn Fn(Seed) -> J,
output_to_input_map: &[usize]
) -> RandomFixedLengthVecs2Inputs<T, I, J>ⓘNotable traits for RandomFixedLengthVecs2Inputs<T, I, J>impl<T, I: Iterator<Item = T>, J: Iterator<Item = T>> Iterator for RandomFixedLengthVecs2Inputs<T, I, J> type Item = Vec<T>;
Expand description
This documentation applies not only to random_vecs_fixed_length_2_inputs
, but also to
random_vecs_fixed_length_3_inputs
, random_vecs_fixed_length_4_inputs
, and so on.
See random_vecs_fixed_length
for more information.
Generates random length-$n$ Vec
s using elements from $m$ iterators, where
$m \leq n$.
The output_to_input_map
parameter defines which iterators are mapped to which slot in
the output Vec
s. The length of the output Vec
s, $n$, is specified by the length
of output_to_input_map
.
The $i$th element of output_to_input_map
is an index from 0 to $m-1$ which specifies
which iterator the $i$th output slot is populated with. Together, the elements must
include all indices from 0 to $m-1$, inclusive, possibly with repetitions.
xs
must be infinite.
Examples
See here.