Skip to main content

Crate problemreductions

Crate problemreductions 

Source
Expand description

§Problem Reductions

NP-hard problem definitions and reductions. See the user guide for tutorials and examples.

§API Overview

ModulePurpose
modelsProblem types — graph, formula, set, algebraic, misc
rulesReduction rules, ReductionGraph for path search
solversBruteForce and ILPSolver
topologyGraph types — SimpleGraph, UnitDiskGraph, etc.
traitsCore traits — Problem, OptimizationProblem, SatisfactionProblem
typesSolutionSize, Direction, ProblemSize, WeightElement
variantVariant 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 optionally CastToParent and/or KValue) for a type.
impl_variant_reduction
Generates a variant-cast ReduceTo impl with #[reduction] registration.
variant_params
Compose a Problem::variant() body from type parameter names.

Enums§

AsymptoticAnalysisError
Error returned when analyzing asymptotic behavior.
CanonicalizationError
Error returned when exact canonicalization fails.
Expr
A symbolic math expression over problem size variables.

Functions§

asymptotic_normal_form
Return a normalized Expr representing the asymptotic behavior of expr.
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.