Function malachite_base::tuples::exhaustive::lex_unique_pairs
source · pub fn lex_unique_pairs<I: Iterator>(xs: I) -> LexUniquePairs<I> ⓘ
Expand description
This documentation applies not only to lex_unique_pairs
, but also to
lex_unique_triples
, lex_unique_quadruples
, and so on. See lex_unique_tuples
for
more information.
Generates $k$-tuples of elements from a single iterator, such that each tuple has no repeated elements.
The source iterator should not repeat any elements, but this is not enforced.
The order is lexicographic with respect to the order of the element iterator.
If the input iterator is infinite, the output length is also infinite.
If the input iterator length is $n$, the output length is $\frac{n!}{k!}$.
If xs
is empty, the output is also empty.
§Examples
See here.