Class EdmondKarpMaxFlow<T, W>
An Edmond Karp max flow implementation on weighted directed graph using
adjacency list representation of graph and residual graph.
Inheritance
EdmondKarpMaxFlow<T, W>
Assembly: Advanced.Algorithms.dll
Syntax
public class EdmondKarpMaxFlow<T, W>
where W : IComparable
Type Parameters
Constructors
EdmondKarpMaxFlow(IFlowOperators<W>)
Declaration
public EdmondKarpMaxFlow(IFlowOperators<W> operators)
Parameters
Methods
ComputeMaxFlow(WeightedDiGraph<T, W>, T, T)
Compute max flow by searching a path
and then augmenting the residual graph until
no more path exists in residual graph with possible flow.
Declaration
public W ComputeMaxFlow(WeightedDiGraph<T, W> graph, T source, T sink)
Parameters
Returns
computeMaxFlowAndReturnResidualGraph(WeightedDiGraph<T, W>, T, T)
Compute max flow by searching a path
and then augmenting the residual graph until
no more path exists in residual graph with possible flow.
Declaration
public WeightedDiGraph<T, W> computeMaxFlowAndReturnResidualGraph(WeightedDiGraph<T, W> graph, T source, T sink)
Parameters
Returns