macro_rules! exhaustive_vecs_fixed_length { ( ($($vis:tt)*), $exhaustive_struct: ident, $exhaustive_custom_fn: ident, $exhaustive_1_to_1_fn: ident, $([$i: expr, $it: ident, $xs: ident, $xs_done: ident, $outputs: ident]),* ) => { ... }; }
Expand description
Defines exhaustive fixed-length Vec
generators.
Malachite provides exhaustive_vecs_length_2
and exhaustive_vecs_fixed_length_2_inputs
,
but you can also define exhaustive_vecs_length_3
, exhaustive_vecs_length_4
, and so on, and
exhaustive_vecs_fixed_length_3_inputs
, exhaustive_vecs_fixed_length_4_inputs
, and so on, in
your program using the code below. The documentation for exhaustive_vecs_length_2
and
exhaustive_vecs_fixed_length_2_inputs
describes these other functions as well.
See usage examples here and here.
use itertools::Itertools;
use malachite_base::exhaustive_vecs_fixed_length;
use malachite_base::iterators::bit_distributor::{BitDistributor, BitDistributorOutputType};
use malachite_base::iterators::iterator_cache::IteratorCache;
use malachite_base::num::conversion::traits::{ExactFrom, WrappingFrom};
use malachite_base::num::logic::traits::SignificantBits;
use malachite_base::vecs::exhaustive::validate_oi_map;
use std::cmp::max;
exhaustive_vecs_fixed_length!(
(pub(crate)),
ExhaustiveFixedLengthVecs3Inputs,
exhaustive_vecs_fixed_length_3_inputs,
exhaustive_vecs_length_3,
[0, I, xs, xs_done, xs_outputs],
[1, J, ys, ys_done, ys_outputs],
[2, K, zs, zs_done, zs_outputs]
);
exhaustive_vecs_fixed_length!(
(pub(crate)),
ExhaustiveFixedLengthVecs4Inputs,
exhaustive_vecs_fixed_length_4_inputs,
exhaustive_vecs_length_4,
[0, I, xs, xs_done, xs_outputs],
[1, J, ys, ys_done, ys_outputs],
[2, K, zs, zs_done, zs_outputs],
[3, L, ws, ws_done, ws_outputs]
);
exhaustive_vecs_fixed_length!(
(pub(crate)),
ExhaustiveFixedLengthVecs5Inputs,
exhaustive_vecs_fixed_length_5_inputs,
exhaustive_vecs_length_5,
[0, I, xs, xs_done, xs_outputs],
[1, J, ys, ys_done, ys_outputs],
[2, K, zs, zs_done, zs_outputs],
[3, L, ws, ws_done, ws_outputs],
[4, M, vs, vs_done, vs_outputs]
);
exhaustive_vecs_fixed_length!(
(pub(crate)),
ExhaustiveFixedLengthVecs6Inputs,
exhaustive_vecs_fixed_length_6_inputs,
exhaustive_vecs_length_6,
[0, I, xs, xs_done, xs_outputs],
[1, J, ys, ys_done, ys_outputs],
[2, K, zs, zs_done, zs_outputs],
[3, L, ws, ws_done, ws_outputs],
[4, M, vs, vs_done, vs_outputs],
[5, N, us, us_done, us_outputs]
);
exhaustive_vecs_fixed_length!(
(pub(crate)),
ExhaustiveFixedLengthVecs7,
exhaustive_vecs_fixed_length_7_inputs,
exhaustive_vecs_length_7,
[0, I, xs, xs_done, xs_outputs],
[1, J, ys, ys_done, ys_outputs],
[2, K, zs, zs_done, zs_outputs],
[3, L, ws, ws_done, ws_outputs],
[4, M, vs, vs_done, vs_outputs],
[5, N, us, us_done, us_outputs],
[6, O, ts, ts_done, ts_outputs]
);
exhaustive_vecs_fixed_length!(
(pub(crate)),
ExhaustiveFixedLengthVecs8Inputs,
exhaustive_vecs_fixed_length_8_inputs,
exhaustive_vecs_length_8,
[0, I, xs, xs_done, xs_outputs],
[1, J, ys, ys_done, ys_outputs],
[2, K, zs, zs_done, zs_outputs],
[3, L, ws, ws_done, ws_outputs],
[4, M, vs, vs_done, vs_outputs],
[5, N, us, us_done, us_outputs],
[6, O, ts, ts_done, ts_outputs],
[7, P, ss, ss_done, ss_outputs]
);