Class EdmondsKarpMaximumFlowAlgorithm<TVertex, TEdge>
Edmond and Karp maximum flow algorithm for directed graph with positive capacities and flows.
Inheritance
Implements
Inherited Members
Namespace: QuikGraph.Algorithms.MaximumFlow
Assembly: QuikGraph.dll
Syntax
public sealed class EdmondsKarpMaximumFlowAlgorithm<TVertex, TEdge> : MaximumFlowAlgorithm<TVertex, TEdge>, IAlgorithm<IMutableVertexAndEdgeListGraph<TVertex, TEdge>>, IComputation, IAlgorithmComponent, IVertexColorizerAlgorithm<TVertex> where TEdge : IEdge<TVertex>
Type Parameters
Name | Description |
---|---|
TVertex | Vertex type. |
TEdge | Edge type. |
Constructors
| Improve this Doc View SourceEdmondsKarpMaximumFlowAlgorithm(IAlgorithmComponent, IMutableVertexAndEdgeListGraph<TVertex, TEdge>, Func<TEdge, Double>, EdgeFactory<TVertex, TEdge>, ReversedEdgeAugmentorAlgorithm<TVertex, TEdge>)
Initializes a new instance of the EdmondsKarpMaximumFlowAlgorithm<TVertex, TEdge> class.
Declaration
public EdmondsKarpMaximumFlowAlgorithm(IAlgorithmComponent host, IMutableVertexAndEdgeListGraph<TVertex, TEdge> visitedGraph, Func<TEdge, double> capacities, EdgeFactory<TVertex, TEdge> edgeFactory, ReversedEdgeAugmentorAlgorithm<TVertex, TEdge> reverseEdgesAugmentorAlgorithm)
Parameters
Type | Name | Description |
---|---|---|
IAlgorithmComponent | host | Host to use if set, otherwise use this reference. |
IMutableVertexAndEdgeListGraph<TVertex, TEdge> | visitedGraph | Graph to visit. |
System.Func<TEdge, System.Double> | capacities | Function that given an edge return the capacity of this edge. |
EdgeFactory<TVertex, TEdge> | edgeFactory | Edge factory method. |
ReversedEdgeAugmentorAlgorithm<TVertex, TEdge> | reverseEdgesAugmentorAlgorithm | Algorithm that is in of charge augmenting the graph (creating missing reversed edges). |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.ArgumentNullException |
|
System.ArgumentNullException |
|
System.ArgumentNullException |
|
System.ArgumentException |
|
EdmondsKarpMaximumFlowAlgorithm(IMutableVertexAndEdgeListGraph<TVertex, TEdge>, Func<TEdge, Double>, EdgeFactory<TVertex, TEdge>, ReversedEdgeAugmentorAlgorithm<TVertex, TEdge>)
Initializes a new instance of the EdmondsKarpMaximumFlowAlgorithm<TVertex, TEdge> class.
Declaration
public EdmondsKarpMaximumFlowAlgorithm(IMutableVertexAndEdgeListGraph<TVertex, TEdge> visitedGraph, Func<TEdge, double> capacities, EdgeFactory<TVertex, TEdge> edgeFactory, ReversedEdgeAugmentorAlgorithm<TVertex, TEdge> reverseEdgesAugmentorAlgorithm)
Parameters
Type | Name | Description |
---|---|---|
IMutableVertexAndEdgeListGraph<TVertex, TEdge> | visitedGraph | Graph to visit. |
System.Func<TEdge, System.Double> | capacities | Function that given an edge return the capacity of this edge. |
EdgeFactory<TVertex, TEdge> | edgeFactory | Edge factory method. |
ReversedEdgeAugmentorAlgorithm<TVertex, TEdge> | reverseEdgesAugmentorAlgorithm | Algorithm that is in of charge of augmenting the graph (creating missing reversed edges). |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
System.ArgumentNullException |
|
System.ArgumentNullException |
|
System.ArgumentNullException |
|
System.ArgumentException |
|
Methods
| Improve this Doc View SourceInitialize()
Called on algorithm initialization step.
Declaration
protected override void Initialize()
Overrides
InternalCompute()
Declaration
protected override void InternalCompute()