Package org.graphstream.algorithm.flow
Class FordFulkersonAlgorithm
java.lang.Object
org.graphstream.algorithm.flow.FlowAlgorithmBase
org.graphstream.algorithm.flow.FordFulkersonAlgorithm
- All Implemented Interfaces:
Algorithm
,FlowAlgorithm
- Direct Known Subclasses:
EdmondsKarpAlgorithm
public class FordFulkersonAlgorithm extends FlowAlgorithmBase
The Ford-Fulkerson algorithm to compute maximum flow.
- Computational Complexity :
- O(Ef), where E is the number of edges in the graph and f is the maximum flow in the graph
- Scientific Reference :
- Ford, L. R.; Fulkerson, D. R. (1956). "Maximal flow through a network". Canadian Journal of Mathematics 8: 399–404
-
Constructor Summary
Constructors Constructor Description FordFulkersonAlgorithm()
-
Method Summary
Modifier and Type Method Description void
compute()
Run the algorithm.String
defaultResult()
Methods inherited from class org.graphstream.algorithm.flow.FlowAlgorithmBase
getCapacity, getCapacity, getCapacity, getCapacityAttribute, getFlow, getFlow, getFlow, getFlowSinkId, getFlowSourceId, getMaximumFlow, init, init, setAllCapacities, setCapacity, setCapacity, setCapacity, setCapacityAttribute, setFlow, setFlow, setFlow, setSinkId, setSourceId
-
Constructor Details
-
FordFulkersonAlgorithm
public FordFulkersonAlgorithm()
-
-
Method Details
-
compute
public void compute()Description copied from interface:Algorithm
Run the algorithm. TheAlgorithm.init(Graph)
method has to be called before computing.- See Also:
Algorithm.init(Graph)
-
defaultResult
-