Defined in File EdmondsKarp.hpp
public NetworKit::Algorithm
(Class Algorithm)
The EdmondsKarp class implements the maximum flow algorithm by Edmonds and Karp.
Public Functions
Constructs an instance of the EdmondsKarp algorithm for the given graph, source and sink
graph – The graph.
source – The source node.
sink – The sink node.
Computes the maximum flow, executes the EdmondsKarp algorithm.
Returns the value of the maximum flow from source to sink.
The maximum flow value
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.
Get the flow value between two nodes u and v.
Warning
The running time of this function is linear in the degree of u.
u – The first node
v – The second node
The flow between node u and v.
Get the flow value of an edge.
eid – The id of the edge
The flow on the edge identified by eid
Return a copy of the flow values of all edges.
Note
Instead of copying all values you can also use the inline function “getFlow(edgeid)” in order to access the values efficiently.
The flow values of all edges