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 |
types | Max, Min, Extremum, ExtremumSense, ProblemParameters, 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 expr::evaluate_approximate;pub use expr::ApproximationError;pub use expr::AsymptoticAnalysisError;pub use growth::Growth;pub use registry::ComplexityClass;pub use registry::ProblemInfo;pub use solvers::BruteForce;pub use traits::Problem;pub use types::And;pub use types::Extremum;pub use types::ExtremumSense;pub use types::Max;pub use types::Min;pub use types::NumericSize;pub use types::One;pub use types::Or;pub use types::ProblemParameters;pub use types::Sum;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.
- expr
- Symbolic expression integration for the problem-reduction domain.
- growth
- Symbolic growth domain: a dedicated asymptotic normal form for reduction parameter expressions.
- io
- File I/O utilities for problem serialization.
- models
- Problem model implementations.
- parameters
- Symbolic parameter transformations carried by reduction rules.
- prelude
- Prelude module for convenient imports.
- random
- Shared deterministic building blocks for model-owned random generators.
- 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§
- decision_
problem_ meta - Register the decision problem name for a concrete optimization problem.
- declare_
variants - Declare explicit problem variants with per-variant complexity metadata.
- impl_
random_ generate - Implement a typed, model-owned random generator using a typed input spec.
- impl_
variant_ param - Implement
VariantParamand optionallyKValuefor a type. - impl_
variant_ reduction - Generates an explicit same-model variant
ReduceToimplementation. - problem_
parameters - Define a problem’s canonical parameters from inherent getter methods.
- register_
brute_ force - Register finite Cartesian reference solvers for concrete problem variants.
- register_
decision_ variant - Register the boilerplate inventory entries for a concrete
Decision<P>variant. - variant_
params - Compose a
Problem::variant()body from type parameter names.
Structs§
- Expr
- A cheap, immutable handle to a shared symbolic expression node.
- Parse
Error
Functions§
- big_
o_ normal_ form - Compute the Big-O normal form of an expression.
Attribute Macros§
- reduction
- Attribute macro for automatic reduction registration.
Derive Macros§
- Create
Spec - Generate static construction-input metadata from a typed create spec.