macro_rules! exhaustive_ordered_unique_tuples { ( ($($vis:tt)*), $struct: ident, $k: expr, $out_t: ty, $fn: ident, [$($i: expr),*] ) => { ... }; }
Expand description
Defines exhaustive ordered unique tuple generators.
Malachite provides exhaustive_ordered_unique_pairs
, but you can also define
exhaustive_ordered_unique_triples
, exhaustive_ordered_unique_quadruples
, and so on, in your
program using the code below. The documentation for exhaustive_ordered_unique_pairs
describes these other functions as well.
See usage examples here.
use malachite_base::exhaustive_ordered_unique_tuples;
use malachite_base::iterators::iterator_cache::IteratorCache;
use malachite_base::vecs::exhaustive::next_bit_pattern;
exhaustive_ordered_unique_tuples!(
(pub(crate)),
ExhaustiveOrderedUniqueTriples,
3,
(I::Item, I::Item, I::Item),
exhaustive_ordered_unique_triples,
[0, 1, 2]
);
exhaustive_ordered_unique_tuples!(
(pub(crate)),
ExhaustiveOrderedUniqueQuadruples,
4,
(I::Item, I::Item, I::Item, I::Item),
exhaustive_ordered_unique_quadruples,
[0, 1, 2, 3]
);
exhaustive_ordered_unique_tuples!(
(pub(crate)),
ExhaustiveOrderedUniqueQuintuples,
5,
(I::Item, I::Item, I::Item, I::Item, I::Item),
exhaustive_ordered_unique_quintuples,
[0, 1, 2, 3, 4]
);
exhaustive_ordered_unique_tuples!(
(pub(crate)),
ExhaustiveOrderedUniqueSextuples,
6,
(I::Item, I::Item, I::Item, I::Item, I::Item, I::Item),
exhaustive_ordered_unique_sextuples,
[0, 1, 2, 3, 4, 5]
);
exhaustive_ordered_unique_tuples!(
(pub(crate)),
ExhaustiveOrderedUniqueSeptuples,
7,
(
I::Item,
I::Item,
I::Item,
I::Item,
I::Item,
I::Item,
I::Item
),
exhaustive_ordered_unique_septuples,
[0, 1, 2, 3, 4, 5, 6]
);
exhaustive_ordered_unique_tuples!(
(pub(crate)),
ExhaustiveOrderedUniqueOctuples,
8,
(
I::Item,
I::Item,
I::Item,
I::Item,
I::Item,
I::Item,
I::Item,
I::Item
),
exhaustive_ordered_unique_octuples,
[0, 1, 2, 3, 4, 5, 6, 7]
);