Bases: Algorithm
The EdmondsKarp class implements the maximum flow algorithm by Edmonds and Karp.
graph (networkit.Graph) – The graph
source (int) – The source node for the flow calculation
sink (int) – The sink node for the flow calculation
Get the flow value between two nodes u and v or an edge identified by the edge id u. Warning: The variant with two edge ids is linear in the degree of u.
u (int) – The first node incident to the edge or the edge id.
v (int, optional) – The second node incident to the edge (optional if edge id is specified). Default: None
The flow on the specified edge.
float
Return a copy of the flow values of all edges.
The flow values of all edges indexed by edge id.
list(float)
Returns the value of the maximum flow from source to sink.
The maximum flow value
float
Returns the set of the nodes on the source side of the flow/minimum cut.
The set of nodes that form the (smallest) source side of the flow/minimum cut.
list(int)