networkop/min_cost_flow library
Minimum-Cost Maximum Flow (Successive Shortest Path with potentials)
Production-minded successive shortest path implementation using Johnson-style potentials and Dijkstra with potentials for efficiency. Provides deterministic, auditable operations with clear error handling.
API:
- MinCostFlow(n)
- addEdge(u,v,cap,cost)
- minCostMaxFlow(s,t,maxf) -> returns (flow, cost)