Skip to main content

Module max_flow

Module max_flow 

Source
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§

MaxFlowResult
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