macro_rules! exhaustive_tuples_1_input { ( ($($vis:tt)*), $exhaustive_struct: ident, $exhaustive_fn: ident, $exhaustive_fn_from_single: ident, $out_type: ty, $([$i: tt, $out_x: ident]),* ) => { ... }; }
Expand description
Defines exhaustive tuple generators that generate tuples from a single iterator.
Malachite provides exhaustive_pairs_from_single
and exhaustive_pairs_1_input
, but you
can also define exhaustive_triples_from_single
, exhaustive_quadruples_from_single
, and so
on, and exhaustive_triples_1_input
, exhaustive_quadruples_1_input
, and so on, in your
program using the code below. The documentation for exhaustive_pairs_from_single
and
exhaustive_pairs_1_input
describes these other functions as well.
See usage examples here and here.
use malachite_base::exhaustive_tuples_1_input;
use malachite_base::iterators::bit_distributor::{BitDistributor, BitDistributorOutputType};
use malachite_base::iterators::iterator_cache::IteratorCache;
use malachite_base::num::arithmetic::traits::CheckedPow;
use malachite_base::num::conversion::traits::{ExactFrom, WrappingFrom};
use malachite_base::num::logic::traits::SignificantBits;
use std::cmp::max;
use std::marker::PhantomData;
exhaustive_tuples_1_input!(
(pub(crate)),
ExhaustiveTriples1Input,
exhaustive_triples_1_input,
exhaustive_triples_from_single,
(I::Item, I::Item, I::Item),
[0, output_type_x],
[1, output_type_y],
[2, output_type_z]
);
exhaustive_tuples_1_input!(
(pub(crate)),
ExhaustiveQuadruples1Input,
exhaustive_quadruples_1_input,
exhaustive_quadruples_from_single,
(I::Item, I::Item, I::Item, I::Item),
[0, output_type_x],
[1, output_type_y],
[2, output_type_z],
[3, output_type_w]
);
exhaustive_tuples_1_input!(
(pub(crate)),
ExhaustiveQuintuples1Input,
exhaustive_quintuples_1_input,
exhaustive_quintuples_from_single,
(I::Item, I::Item, I::Item, I::Item, I::Item),
[0, output_type_x],
[1, output_type_y],
[2, output_type_z],
[3, output_type_w],
[4, output_type_v]
);
exhaustive_tuples_1_input!(
(pub(crate)),
ExhaustiveSextuples1Input,
exhaustive_sextuples_1_input,
exhaustive_sextuples_from_single,
(I::Item, I::Item, I::Item, I::Item, I::Item, I::Item),
[0, output_type_x],
[1, output_type_y],
[2, output_type_z],
[3, output_type_w],
[4, output_type_v],
[5, output_type_u]
);
exhaustive_tuples_1_input!(
(pub(crate)),
ExhaustiveSeptuples1Input,
exhaustive_septuples_1_input,
exhaustive_septuples_from_single,
(
I::Item,
I::Item,
I::Item,
I::Item,
I::Item,
I::Item,
I::Item
),
[0, output_type_x],
[1, output_type_y],
[2, output_type_z],
[3, output_type_w],
[4, output_type_v],
[5, output_type_u],
[6, output_type_t]
);
exhaustive_tuples_1_input!(
(pub(crate)),
ExhaustiveOctuples1Input,
exhaustive_octuples_1_input,
exhaustive_octuples_from_single,
(
I::Item,
I::Item,
I::Item,
I::Item,
I::Item,
I::Item,
I::Item,
I::Item
),
[0, output_type_x],
[1, output_type_y],
[2, output_type_z],
[3, output_type_w],
[4, output_type_v],
[5, output_type_u],
[6, output_type_t],
[7, output_type_s]
);