Macro malachite_base::exhaustive_unique_tuples
source ยท macro_rules! exhaustive_unique_tuples { ( ($($vis:tt)*), $struct: ident, $k: expr, $out_t: ty, $fn: ident, [$($i: expr),*] ) => { ... }; }
Expand description
Defines lexicographic unique tuple generators.
Malachite provides exhaustive_unique_pairs
, but you can also define
exhaustive_unique_triples
, lex_unique_quadruples
, and so on, in your program using the code
below.
See usage examples here.
use malachite_base::exhaustive_unique_tuples;
use malachite_base::num::iterators::{ruler_sequence, RulerSequence};
use malachite_base::tuples::exhaustive::{
exhaustive_dependent_pairs, ExhaustiveDependentPairs,
};
use malachite_base::vecs::exhaustive::{
exhaustive_ordered_unique_vecs_fixed_length, ExhaustiveOrderedUniqueCollections,
ExhaustiveUniqueVecsGenerator,
};
use malachite_base::vecs::ExhaustiveVecPermutations;
exhaustive_unique_tuples!(
(pub(crate)),
ExhaustiveUniqueTriples,
3,
(I::Item, I::Item, I::Item),
exhaustive_unique_triples,
[0, 1, 2]
);
exhaustive_unique_tuples!(
(pub(crate)),
ExhaustiveUniqueQuadruples,
4,
(I::Item, I::Item, I::Item, I::Item),
exhaustive_unique_quadruples,
[0, 1, 2, 3]
);
exhaustive_unique_tuples!(
(pub(crate)),
ExhaustiveUniqueQuintuples,
5,
(I::Item, I::Item, I::Item, I::Item, I::Item),
exhaustive_unique_quintuples,
[0, 1, 2, 3, 4]
);
exhaustive_unique_tuples!(
(pub(crate)),
ExhaustiveUniqueSextuples,
6,
(I::Item, I::Item, I::Item, I::Item, I::Item, I::Item),
exhaustive_unique_sextuples,
[0, 1, 2, 3, 4, 5]
);
exhaustive_unique_tuples!(
(pub(crate)),
ExhaustiveUniqueSeptuples,
7,
(
I::Item,
I::Item,
I::Item,
I::Item,
I::Item,
I::Item,
I::Item
),
exhaustive_unique_septuples,
[0, 1, 2, 3, 4, 5, 6]
);
exhaustive_unique_tuples!(
(pub(crate)),
ExhaustiveUniqueOctuples,
8,
(
I::Item,
I::Item,
I::Item,
I::Item,
I::Item,
I::Item,
I::Item,
I::Item
),
exhaustive_unique_octuples,
[0, 1, 2, 3, 4, 5, 6, 7]
);