Macro malachite_base::lex_vecs_fixed_length
source ยท macro_rules! lex_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_outputs: ident]),* ) => { ... }; }
Expand description
Defines lexicographic fixed-length Vec
generators.
Malachite provides lex_vecs_length_2
and lex_vecs_fixed_length_2_inputs
, but you can
also define lex_vecs_length_3
, lex_vecs_length_4
, and so on, and
lex_vecs_fixed_length_3_inputs
, lex_vecs_fixed_length_4_inputs
, and so on, in your program
using the code below. The documentation for lex_vecs_length_2
and
lex_vecs_fixed_length_2_inputs
describes these other functions as well.
See usage examples here and here.
use malachite_base::iterators::iterator_cache::IteratorCache;
use malachite_base::lex_vecs_fixed_length;
use malachite_base::vecs::exhaustive::{validate_oi_map, LexFixedLengthVecsOutput};
lex_vecs_fixed_length!(
(pub(crate)),
LexFixedLengthVecs3Inputs,
lex_vecs_fixed_length_3_inputs,
lex_vecs_length_3,
[0, I, xs, xs_outputs],
[1, J, ys, ys_outputs],
[2, K, zs, zs_outputs]
);
lex_vecs_fixed_length!(
(pub(crate)),
LexFixedLengthVecs4Inputs,
lex_vecs_fixed_length_4_inputs,
lex_vecs_length_4,
[0, I, xs, xs_outputs],
[1, J, ys, ys_outputs],
[2, K, zs, zs_outputs],
[3, L, ws, ws_outputs]
);
lex_vecs_fixed_length!(
(pub(crate)),
LexFixedLengthVecs5Inputs,
lex_vecs_fixed_length_5_inputs,
lex_vecs_length_5,
[0, I, xs, xs_outputs],
[1, J, ys, ys_outputs],
[2, K, zs, zs_outputs],
[3, L, ws, ws_outputs],
[4, M, vs, vs_outputs]
);
lex_vecs_fixed_length!(
(pub(crate)),
LexFixedLengthVecs6Inputs,
lex_vecs_fixed_length_6_inputs,
lex_vecs_length_6,
[0, I, xs, xs_outputs],
[1, J, ys, ys_outputs],
[2, K, zs, zs_outputs],
[3, L, ws, ws_outputs],
[4, M, vs, vs_outputs],
[5, N, us, us_outputs]
);
lex_vecs_fixed_length!(
(pub(crate)),
LexFixedLengthVecs7Inputs,
lex_vecs_fixed_length_7_inputs,
lex_vecs_length_7,
[0, I, xs, xs_outputs],
[1, J, ys, ys_outputs],
[2, K, zs, zs_outputs],
[3, L, ws, ws_outputs],
[4, M, vs, vs_outputs],
[5, N, us, us_outputs],
[6, O, ts, ts_outputs]
);
lex_vecs_fixed_length!(
(pub(crate)),
LexFixedLengthVecs8Inputs,
lex_vecs_fixed_length_8_inputs,
lex_vecs_length_8,
[0, I, xs, xs_outputs],
[1, J, ys, ys_outputs],
[2, K, zs, zs_outputs],
[3, L, ws, ws_outputs],
[4, M, vs, vs_outputs],
[5, N, us, us_outputs],
[6, O, ts, ts_outputs],
[7, P, ss, ss_outputs]
);