Module variant

Module variant 

Source
Expand description

Variant system for type-level problem parameterization.

Types declare their variant category, value, and parent via VariantParam. The impl_variant_param! macro registers types with the trait. The variant_params! macro composes Problem::variant() bodies from type parameter names.

Structs§

K1
K=1 (e.g., 1-coloring).
K2
K=2 (e.g., 2-SAT, 2-coloring).
K3
K=3 (e.g., 3-SAT, 3-coloring).
K4
K=4 (e.g., 4-coloring).
K5
K=5 (e.g., 5-coloring).
KN
Generic K (any value). Used for reductions that apply to all K.

Traits§

CastToParent
Types that can convert themselves to their parent in the variant hierarchy.
KValue
K-value marker trait for types that represent a const-generic K parameter.
VariantParam
A type that participates in the variant system.