-
- Type Parameters:
V- the graph vertex typeE- the graph edge type
- All Superinterfaces:
FlowAlgorithm<V,E>
- All Known Implementing Classes:
BoykovKolmogorovMFImpl,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 interfaceMaximumFlowAlgorithm.MaximumFlow<E>A maximum flowstatic classMaximumFlowAlgorithm.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 fromsourcetosink.default doublegetMaximumFlowValue(V source, V sink)Sets current source tosource, current sink tosink, then calculates maximum flow fromsourcetosink.-
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 fromsourcetosink. 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 fromsourcetosink. Note, thatsourceandsinkmust be vertices of thenetworkpassed to the constructor, and they must be different.- Parameters:
source- source vertexsink- sink vertex- Returns:
- the value of the maximum flow
-
-