Function malachite_base::tuples::exhaustive::lex_ordered_unique_pairs
source · pub const fn lex_ordered_unique_pairs<I: Iterator>(
xs: I,
) -> LexOrderedUniquePairs<I> ⓘ
Expand description
This documentation applies not only to lex_ordered_unique_pairs
, but also to
lex_ordered_unique_triples
, lex_ordered_unique_quadruples
, and so on. See
lex_ordered_unique_tuples
for more information.
Generates $k$-tuples of elements from a single iterator, such that each tuple has no
repeated elements, and the elements in each Vec
are ordered the same way as they are
in the source iterator.
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 $\binom{n}{k}$.
If xs
is empty, the output is also empty.
§Examples
See here.