Expand description

Iterators that generate unions without repetition.

lex_union2s

use itertools::Itertools;
use malachite_base::bools::exhaustive::exhaustive_bools;
use malachite_base::unions::exhaustive::lex_union2s;
use malachite_base::unions::Union2;

let u2s = lex_union2s(exhaustive_bools(), 0..4).collect_vec();
assert_eq!(
    u2s.as_slice(),
    &[
        Union2::A(false),
        Union2::A(true),
        Union2::B(0),
        Union2::B(1),
        Union2::B(2),
        Union2::B(3)
    ]
);

exhaustive_union2s

use itertools::Itertools;
use malachite_base::bools::exhaustive::exhaustive_bools;
use malachite_base::unions::exhaustive::exhaustive_union2s;
use malachite_base::unions::Union2;

let u2s = exhaustive_union2s(exhaustive_bools(), 0..4).collect_vec();
assert_eq!(
    u2s.as_slice(),
    &[
        Union2::A(false),
        Union2::B(0),
        Union2::A(true),
        Union2::B(1),
        Union2::B(2),
        Union2::B(3)
    ]
);

Structs

This documentation applies not only to ExhaustiveUnion2s, but also to ExhaustiveUnion3s, ExhaustiveUnion4s, and so on. See exhaustive_unions for more information.
This documentation applies not only to LexUnion2s, but also to LexUnion3s, LexUnion4s, and so on. See exhaustive_unions for more information.

Functions

This documentation applies not only to exhaustive_union2s, but also to exhaustive_union3s, exhaustive_union4s, and so on. See exhaustive_unions for more information.
This documentation applies not only to lex_union2s, but also to lex_union3s, lex_union4s, and so on. See exhaustive_unions for more information.