Package org.jgrapht.alg.interfaces
Interface MaximumFlowAlgorithm<V,E>
-
- Type Parameters:
V
- the graph vertex typeE
- the graph edge type
- All Superinterfaces:
FlowAlgorithm<V,E>
- All Known Implementing Classes:
DinicMFImpl
,EdmondsKarpMFImpl
,GusfieldEquivalentFlowTree
,GusfieldGomoryHuCutTree
,MaximumFlowAlgorithmBase
,PushRelabelMFImpl
public interface MaximumFlowAlgorithm<V,E> extends FlowAlgorithm<V,E>
Allows to derive maximum-flow from the supplied flow network- Author:
- Alexey Kudinkin, Joris Kinable
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
MaximumFlowAlgorithm.MaximumFlow<E>
A maximum flowstatic class
MaximumFlowAlgorithm.MaximumFlowImpl<E>
Default implementation of the maximum flow-
Nested classes/interfaces inherited from interface org.jgrapht.alg.interfaces.FlowAlgorithm
FlowAlgorithm.Flow<E>, FlowAlgorithm.FlowImpl<E>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description MaximumFlowAlgorithm.MaximumFlow<E>
getMaximumFlow(V source, V sink)
Sets current source tosource
, current sink tosink
, then calculates maximum flow fromsource
tosink
.default double
getMaximumFlowValue(V source, V sink)
Sets current source tosource
, current sink tosink
, then calculates maximum flow fromsource
tosink
.-
Methods inherited from interface org.jgrapht.alg.interfaces.FlowAlgorithm
getFlow, getFlowDirection, getFlowMap
-
-
-
-
Method Detail
-
getMaximumFlow
MaximumFlowAlgorithm.MaximumFlow<E> getMaximumFlow(V source, V sink)
Sets current source tosource
, current sink tosink
, then calculates maximum flow fromsource
tosink
. Returns an object containing detailed information about the flow.- Parameters:
source
- source of the flow inside the networksink
- sink of the flow inside the network- Returns:
- maximum flow
-
getMaximumFlowValue
default double getMaximumFlowValue(V source, V sink)
Sets current source tosource
, current sink tosink
, then calculates maximum flow fromsource
tosink
. Note, thatsource
andsink
must be vertices of thenetwork
passed to the constructor, and they must be different.- Parameters:
source
- source vertexsink
- sink vertex- Returns:
- the value of the maximum flow
-
-