V
- the graph vertex typeE
- the graph edge typepublic interface MaximumFlowAlgorithm<V,E>
Modifier and Type | Interface and Description |
---|---|
static interface |
MaximumFlowAlgorithm.MaximumFlow<E>
A maximum flow
|
static class |
MaximumFlowAlgorithm.MaximumFlowImpl<E>
Default implementation of the maximum flow
|
Modifier and Type | Method and Description |
---|---|
default double |
calculateMaximumFlow(V source,
V sink)
Sets current source to source, current sink to sink, then calculates
maximum flow from source to sink.
|
default V |
getFlowDirection(E e)
Returns the direction of the flow on an edge (u,v).
|
default Map<E,Double> |
getFlowMap()
Returns maximum flow, that was calculated during last
calculateMaximumFlow call, or null, if there was no
calculateMaximumFlow calls.
|
MaximumFlowAlgorithm.MaximumFlow<E> |
getMaximumFlow(V source,
V sink)
Sets current source to source, current sink to sink, then calculates
maximum flow from source to sink.
|
default double |
getMaximumFlowValue()
Returns maximum flow value, that was calculated during last
calculateMaximumFlow call.
|
MaximumFlowAlgorithm.MaximumFlow<E> getMaximumFlow(V source, V sink)
source
- source of the flow inside the networksink
- sink of the flow inside the networkdefault double calculateMaximumFlow(V source, V sink)
source
- source vertexsink
- sink vertexdefault double getMaximumFlowValue()
default Map<E,Double> getFlowMap()
default V getFlowDirection(E e)
e
- edgeCopyright © 2017. All rights reserved.