Package org.graph4j.flow
Class PushRelabelMaximumFlow
java.lang.Object
org.graph4j.flow.MaximumFlowBase
org.graph4j.flow.PushRelabelMaximumFlow
- All Implemented Interfaces:
MaximumFlowAlgorithm
The Push-Relabel algorithm maintains a preflow (where flow into a node can
exceed flow out of it) and repeatedly pushes excess flow from overflowing
vertices to neighboring vertices or relabels the height of the overflowing
vertices to find new paths.
The algorithm has a time complexity of O(n2m), where n is
the number of vertices and m the number of edges in the graph.
- Author:
- Cristian Frăsinaru
-
Field Summary
Fields inherited from class org.graph4j.flow.MaximumFlowBase
computed, cutEdges, ekAlg, graph, initialFlow, numVertices, sink, sinkIndex, sinkPart, source, sourceIndex, sourcePart -
Constructor Summary
ConstructorsConstructorDescriptionPushRelabelMaximumFlow(Network graph) PushRelabelMaximumFlow(Network graph, FlowData flow) -
Method Summary
Methods inherited from class org.graph4j.flow.MaximumFlowBase
getFlowValue, getMaximumFlowData, getMaximumFlowValue, getMinimumCutEdges, getSinkPart, getSourcePart, initFlowMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.graph4j.flow.MaximumFlowAlgorithm
getFlowValue
-
Constructor Details
-
PushRelabelMaximumFlow
-
PushRelabelMaximumFlow
-
-
Method Details
-
computeMaximumFlow
public void computeMaximumFlow()- Specified by:
computeMaximumFlowin classMaximumFlowBase
-