V
- the graph vertex typeE
- the graph edge type
TODO: Rename buildMaximumFlow(V source, V sink) to getMaximumFlow(V source, V sink)public 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 |
---|---|
MaximumFlowAlgorithm.MaximumFlow<E> |
buildMaximumFlow(V source,
V sink)
Sets current source to source, current sink to sink, then calculates
maximum flow from source to sink.
|
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.
|
default Map<E,Double> |
getMaximumFlow()
Deprecated.
Use
getFlowMap() instead |
default double |
getMaximumFlowValue()
Returns maximum flow value, that was calculated during last
calculateMaximumFlow call.
|
MaximumFlowAlgorithm.MaximumFlow<E> buildMaximumFlow(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> getMaximumFlow()
getFlowMap()
insteaddefault Map<E,Double> getFlowMap()
default V getFlowDirection(E e)
e
- edgeCopyright © 2016. All rights reserved.