Function malachite_base::tuples::exhaustive::lex_pairs_from_single

source ·
pub const fn lex_pairs_from_single<T: Clone, I: Iterator<Item = T>>(
    xs: I
) -> LexPairsFromSingle<T, I> 
Expand description

This documentation applies not only to lex_pairs_from_single, but also to lex_triples_from_single, lex_quadruples_from_single, and so on. See lex_tuples for more information.

Generates all $n$-tuples with elements from a single iterator, in lexicographic order.

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

xs must be finite.

The output length is $k^n$, where $k$ is xs.count() and $n$ is len.

If xs is empty, the output is also empty.

§Examples

See here.