pub fn lex_vecs_fixed_length_2_inputs<T: Clone, I: Iterator<Item = T>, J: Iterator<Item = T>>(
    xs: I,
    ys: J,
    output_to_input_map: &[usize]
) -> LexFixedLengthVecs2Inputs<T, I, J> 
Expand description

This documentation applies not only to lex_vecs_fixed_length_2_inputs, but also to lex_vecs_fixed_length_3_inputs, lex_vecs_fixed_length_4_inputs, and so on. See lex_vecs_fixed_length for more information.

Generates all length-$n$ Vecs with elements from $m$ iterators, where $m \leq n$, in lexicographic order.

The order is lexicographic with respect to the order of the element iterators.

The output_to_input_map parameter defines which iterators are mapped to which slot in the output Vecs. The length of the output Vecs, $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.

Let xs be the input iterator mapped to the first slot of the output Vecs. All the input iterators, except possibly xs, must be finite. If xs is finite, the output length is the product of the lengths of all the input iterators. If xs is infinite, the output is also infinite.

If any of the input iterators is empty, the output is also empty.

§Examples

See here.