Defined in File Dinic.hpp
public NetworKit::Algorithm
(Class Algorithm)
Computes maximum flow in a directed, weighted graph using Dinic’s algorithm.
This class implements the blocking flow approach of Dinic’s algorithm to compute the maximum flow from a given source to a target node.
Public Functions
Construct a Dinic flow solver.
G – Reference to the input directed, weighted graph.
src – Source node identifier.
dst – Target node identifier.
std::runtime_error – if the graph is not directed, not weighted, or src == dst.
Execute the algorithm to compute maximum flow.
Initializes the residual graph, then repeatedly performs BFS to build level graphs and DFS to find blocking flows until no augmenting path remains.
Retrieve the maximum flow value.
std::runtime_error – if called before run().
The computed maximum flow from source to target.