2 unstable releases
new 0.2.0 | Mar 4, 2025 |
---|---|
0.1.0 | Feb 23, 2025 |
#201 in Template engine
68 downloads per month
20KB
253 lines
Branch-and-Bound-templates
Branch and Bound / Backtracking algorithms template library in Rust
lib.rs
:
This library implements generic branch-and-bound and backtracking solver.
Branch-and-bound (and backtracking, which is its special case) is the method of solving an optimization problem by recursively breaking a problem down to subproblems and then solving them. Unlike brute-force, branch-and-bound will discard a subproblem if it discovers that the best potentially obtainable solution to this subproblem is not better than the current best solution (aka incumbent).
To use the library, one shell implement a type that represents a problem
(subproblem) and implement the Subproblem
trait for it.
One can then solve
an instance of problem using one of the predefined
methods (DFS, BFS, BeFS, etc) or use solve_with_container
, through
which custom strategies can be implemented.
Dependencies
~100KB