EdmondsKarpMaximumFlow
instead@Deprecated public final class EdmondsKarpMaximumFlow<V,E> extends Object implements MaximumFlowAlgorithm<V,E>
MaximumFlowAlgorithm.MaximumFlow<V,E>, MaximumFlowAlgorithm.MaximumFlowImpl<V,E>
Modifier and Type | Field and Description |
---|---|
static double |
DEFAULT_EPSILON
Deprecated.
Default tolerance.
|
Constructor and Description |
---|
EdmondsKarpMaximumFlow(DirectedGraph<V,E> network)
Deprecated.
Constructs MaximumFlow instance to work with a copy of
network.
|
EdmondsKarpMaximumFlow(DirectedGraph<V,E> network,
double epsilon)
Deprecated.
Constructs MaximumFlow instance to work with a copy of
network.
|
Modifier and Type | Method and Description |
---|---|
MaximumFlowAlgorithm.MaximumFlow<V,E> |
buildMaximumFlow(V source,
V sink)
Deprecated.
Builds maximum flow for the supplied network flow, for the supplied
${source} and ${sink}
|
void |
calculateMaximumFlow(V source,
V sink)
Deprecated.
Sets current source to source, current sink to sink,
then calculates maximum flow from source to sink.
|
V |
getCurrentSink()
Deprecated.
Returns current sink vertex, or null if there was no
calculateMaximumFlow calls.
|
V |
getCurrentSource()
Deprecated.
Returns current source vertex, or null if there was no
calculateMaximumFlow calls.
|
Map<E,Double> |
getMaximumFlow()
Deprecated.
Returns maximum flow, that was calculated during last
calculateMaximumFlow call, or null, if there was no
calculateMaximumFlow calls.
|
Double |
getMaximumFlowValue()
Deprecated.
Returns maximum flow value, that was calculated during last
calculateMaximumFlow call, or null, if there was no
calculateMaximumFlow calls.
|
public static final double DEFAULT_EPSILON
public EdmondsKarpMaximumFlow(DirectedGraph<V,E> network)
network
- network, where maximum flow will be calculatedpublic EdmondsKarpMaximumFlow(DirectedGraph<V,E> network, double epsilon)
network
- network, where maximum flow will be calculatedepsilon
- tolerance for comparing doublespublic void calculateMaximumFlow(V source, V sink)
source
- source vertexsink
- sink vertexpublic Double getMaximumFlowValue()
public Map<E,Double> getMaximumFlow()
public V getCurrentSource()
public V getCurrentSink()
public MaximumFlowAlgorithm.MaximumFlow<V,E> buildMaximumFlow(V source, V sink)
MaximumFlowAlgorithm
buildMaximumFlow
in interface MaximumFlowAlgorithm<V,E>
source
- source of the flow inside the networksink
- sink of the flow inside the networkCopyright © 2016. All rights reserved.