Expand description
Maximum flow algorithms for graphs
This module provides algorithms for computing maximum flow in networks:
- Ford-Fulkerson algorithm with DFS
- Edmonds-Karp algorithm (Ford-Fulkerson with BFS)
- Dinic’s algorithm
- Push-relabel algorithm
Structs§
- MaxFlow
Result - Result of a maximum flow computation
Functions§
- dinic
- Compute maximum flow using Dinic’s algorithm
- edmonds_
karp - Compute maximum flow using Edmonds-Karp algorithm (BFS variant of Ford-Fulkerson)
- ford_
fulkerson - Compute maximum flow using Ford-Fulkerson algorithm with DFS
- min_cut
- Compute minimum cut using max-flow min-cut theorem