#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct CardSpec {
pub key: &'static str,
pub summary: &'static str,
pub operations: &'static [&'static str],
pub data_forms: &'static [&'static str],
pub limits: &'static str,
}
pub fn combinatorics_cards() -> &'static [CardSpec] {
const CARDS: &[CardSpec] = &[CardSpec {
key: "discrete/combinatorics",
summary: "Exact counts, lazy enumerators, and canonical ordinals.",
operations: &[
"factorial",
"binomial",
"stirling2",
"bell-number",
"integer-partition-count",
"subsets",
"combinations",
"permutations",
"words",
"integer-partitions",
"canonical-cycles",
"longest-only",
"rank-unrank",
],
data_forms: &[
"word",
"bit-vector",
"subset",
"combination",
"permutation",
"cycle",
"partition",
],
limits: "Counts are exact BigUint. Bitmask iterators cap cardinality at \
127; explosive enumerations require explicit bounds from the \
caller via take/limit.",
}];
CARDS
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn card_present() {
assert_eq!(combinatorics_cards()[0].key, "discrete/combinatorics");
}
}