Class ReversedEdgeAugmentorAlgorithm<TVertex, TEdge>
Routines to add and remove auxiliary edges when using EdmondsKarpMaximumFlowAlgorithm<TVertex, TEdge> or InternalCompute(). Remember to call RemoveReversedEdges() to remove auxiliary edges.
Inheritance
Implements
Inherited Members
Namespace: QuikGraph.Algorithms.MaximumFlow
Assembly: QuikGraph.dll
Syntax
public sealed class ReversedEdgeAugmentorAlgorithm<TVertex, TEdge> : IDisposable where TEdge : IEdge<TVertex>
Type Parameters
| Name | Description |
|---|---|
| TVertex | Vertex type. |
| TEdge | Edge type. |
Constructors
| Improve this Doc View SourceReversedEdgeAugmentorAlgorithm(IMutableVertexAndEdgeListGraph<TVertex, TEdge>, EdgeFactory<TVertex, TEdge>)
Initializes a new instance of the ReversedEdgeAugmentorAlgorithm<TVertex, TEdge> class.
Declaration
public ReversedEdgeAugmentorAlgorithm(IMutableVertexAndEdgeListGraph<TVertex, TEdge> visitedGraph, EdgeFactory<TVertex, TEdge> edgeFactory)
Parameters
| Type | Name | Description |
|---|---|---|
| IMutableVertexAndEdgeListGraph<TVertex, TEdge> | visitedGraph | Graph to visit. |
| EdgeFactory<TVertex, TEdge> | edgeFactory | Edge factory method. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException |
|
| System.ArgumentNullException |
|
Properties
| Improve this Doc View SourceAugmented
Gets the state augmented or not of the graph (reversed edges added or not).
Declaration
public bool Augmented { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
AugmentedEdges
Edges added to the initial graph (augmented ones).
Declaration
public IEnumerable<TEdge> AugmentedEdges { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<TEdge> |
EdgeFactory
Edge factory method.
Declaration
public EdgeFactory<TVertex, TEdge> EdgeFactory { get; }
Property Value
| Type | Description |
|---|---|
| EdgeFactory<TVertex, TEdge> |
ReversedEdges
Edges associated to their reversed edges.
Declaration
public IDictionary<TEdge, TEdge> ReversedEdges { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IDictionary<TEdge, TEdge> |
VisitedGraph
Gets the graph to visit with this algorithm.
Declaration
public IMutableVertexAndEdgeListGraph<TVertex, TEdge> VisitedGraph { get; }
Property Value
| Type | Description |
|---|---|
| IMutableVertexAndEdgeListGraph<TVertex, TEdge> |
Methods
| Improve this Doc View SourceAddReversedEdges()
Adds auxiliary edges to VisitedGraph to store residual flows.
Declaration
public void AddReversedEdges()
Exceptions
| Type | Condition |
|---|---|
| System.InvalidOperationException | If the graph is already augmented. |
RemoveReversedEdges()
Removes reversed edges that were added.
Declaration
public void RemoveReversedEdges()
Exceptions
| Type | Condition |
|---|---|
| System.InvalidOperationException | If the graph was not augmented yet. |
Events
| Improve this Doc View SourceReversedEdgeAdded
Fired when a reversed edge is added.
Declaration
public event EdgeAction<TVertex, TEdge> ReversedEdgeAdded
Event Type
| Type | Description |
|---|---|
| EdgeAction<TVertex, TEdge> |
Explicit Interface Implementations
| Improve this Doc View SourceIDisposable.Dispose()
Declaration
void IDisposable.Dispose()