Expand description
§Problem Reductions
NP-hard problem definitions and reductions. See the user guide for tutorials and examples.
§API Overview
| Module | Purpose |
|---|---|
models | Problem types — graph, formula, set, algebraic, misc |
rules | Reduction rules, ReductionGraph for path search |
solvers | BruteForce and ILPSolver |
topology | Graph types — SimpleGraph, UnitDiskGraph, etc. |
traits | Core traits — Problem, OptimizationProblem, SatisfactionProblem |
types | SolutionSize, Direction, ProblemSize, WeightElement |
variant | Variant parameter system for problem type parameterization |
Use prelude for convenient imports.
Re-exports§
pub use error::ProblemError;pub use error::Result;pub use registry::ComplexityClass;pub use registry::ProblemInfo;pub use solvers::BruteForce;pub use solvers::Solver;pub use traits::OptimizationProblem;pub use traits::Problem;pub use traits::SatisfactionProblem;pub use types::Direction;pub use types::NumericSize;pub use types::One;pub use types::ProblemSize;pub use types::SolutionSize;pub use types::Unweighted;pub use types::WeightElement;pub use inventory;
Modules§
- config
- Configuration utilities for problem solving.
- error
- Error types for the problemreductions library.
- export
- JSON export schema for example payloads.
- io
- File I/O utilities for problem serialization.
- models
- Problem model implementations.
- prelude
- Prelude module for convenient imports.
- registry
- Problem registry and metadata types.
- rules
- Reduction rules between NP-hard problems.
- solvers
- Solvers for computational problems.
- topology
- Graph topology types.
- traits
- Core traits for problem definitions.
- types
- Common types used across the problemreductions library.
- variant
- Variant system for type-level problem parameterization.
Macros§
- declare_
variants - Declare explicit problem variants with per-variant complexity metadata.
- impl_
variant_ param - Implement
VariantParam(and optionallyCastToParentand/orKValue) for a type. - impl_
variant_ reduction - Generates a variant-cast
ReduceToimpl with#[reduction]registration. - variant_
params - Compose a
Problem::variant()body from type parameter names.
Enums§
- Asymptotic
Analysis Error - Error returned when analyzing asymptotic behavior.
- Canonicalization
Error - Error returned when exact canonicalization fails.
- Expr
- A symbolic math expression over problem size variables.
Functions§
- asymptotic_
normal_ form - Return a normalized
Exprrepresenting the asymptotic behavior ofexpr. - big_
o_ normal_ form - Compute the Big-O normal form of an expression.
- canonical_
form - Normalize an expression into its exact canonical sum-of-terms form.
Attribute Macros§
- reduction
- Attribute macro for automatic reduction registration.