mcmf
This crate is for solving instances of the minimum cost maximum flow problem. It uses the network simplex algorithm from the LEMON graph optimization library.
A number of problems are special cases of min cost max flow, including max flow, single-source shortest path, and maximum weighted matching on a bipartite graph.
As such, this crate can solve all of the above problems, though it may potentially be less efficient than a specialized algorithm.
See the documentation.
Example
use ;
let = new
.add_edge
.add_edge
.add_edge
.add_edge
.add_edge
.mcmf;
assert_eq!;
assert_eq!;
assert_eq!;
assert!;
assert!;