Package org.graph4j.flow
Interface MaximumFlowAlgorithm
- All Known Implementing Classes:
DinicMaximumFlow,EdmondsKarpMaximumFlow,MaximumFlowBase,PushRelabelMaximumFlow
public interface MaximumFlowAlgorithm
Contract for algorithms that computeMaximumFlow a maximum flow in a transportation
network.
- Author:
- Cristian Frăsinaru
-
Method Summary
Modifier and TypeMethodDescriptiondoublegetFlowValue(int v, int u) Returns the value of the maximum flow on the specified edge.default doublegetFlowValue(Edge e) Returns the value of the maximum flow on the specified edge.static MaximumFlowAlgorithmgetInstance(Network graph) Creates a data structure storing the flow value for all edges.doubleReturns the value of the maximum flow of the network.
-
Method Details
-
getFlowValue
double getFlowValue(int v, int u) Returns the value of the maximum flow on the specified edge.- Parameters:
v- a vertex number.u- a vertex number.- Returns:
- the maximum flow on (v,u) edge.
-
getFlowValue
Returns the value of the maximum flow on the specified edge.- Parameters:
e- an edge of the network.- Returns:
- the maximum flow on
e.
-
getMaximumFlowValue
double getMaximumFlowValue()Returns the value of the maximum flow of the network.- Returns:
- the maximum value of the flow.
-
getMaximumFlowData
FlowData getMaximumFlowData()Creates a data structure storing the flow value for all edges.- Returns:
- a data structure storing the flow value for all edges.
-
getSourcePart
VertexSet getSourcePart()- Returns:
- the partition set of a minimum cut containing the source vertex.
-
getSinkPart
VertexSet getSinkPart()- Returns:
- the partition set of a minimum cut containing the sink vertex.
-
getMinimumCutEdges
EdgeSet getMinimumCutEdges()- Returns:
- the edges of a minimum cut set.
-
getInstance
- Parameters:
graph- the input network.- Returns:
- the default implementation of this interface.
-