Class ImplicitEdgeDepthFirstSearchAlgorithm<TVertex, TEdge>
An edge depth first search algorithm for implicit directed graphs.
Inheritance
Implements
Inherited Members
Namespace: QuikGraph.Algorithms.Search
Assembly: QuikGraph.dll
Syntax
public sealed class ImplicitEdgeDepthFirstSearchAlgorithm<TVertex, TEdge> : RootedAlgorithmBase<TVertex, IIncidenceGraph<TVertex, TEdge>>, IAlgorithm<IIncidenceGraph<TVertex, TEdge>>, IComputation, IAlgorithmComponent, IEdgeColorizerAlgorithm<TVertex, TEdge>, ITreeBuilderAlgorithm<TVertex, TEdge> where TEdge : IEdge<TVertex>
Type Parameters
Name | Description |
---|---|
TVertex | Vertex type. |
TEdge | Edge type. |
Remarks
This is a variant of the classic DFS where the edges are color marked.
Constructors
| Improve this Doc View SourceImplicitEdgeDepthFirstSearchAlgorithm(IAlgorithmComponent, IIncidenceGraph<TVertex, TEdge>)
Initializes a new instance of the ImplicitEdgeDepthFirstSearchAlgorithm<TVertex, TEdge> class.
Declaration
public ImplicitEdgeDepthFirstSearchAlgorithm(IAlgorithmComponent host, IIncidenceGraph<TVertex, TEdge> visitedGraph)
Parameters
Type | Name | Description |
---|---|---|
IAlgorithmComponent | host | Host to use if set, otherwise use this reference. |
IIncidenceGraph<TVertex, TEdge> | visitedGraph | Graph to visit. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
ImplicitEdgeDepthFirstSearchAlgorithm(IIncidenceGraph<TVertex, TEdge>)
Initializes a new instance of the ImplicitEdgeDepthFirstSearchAlgorithm<TVertex, TEdge> class.
Declaration
public ImplicitEdgeDepthFirstSearchAlgorithm(IIncidenceGraph<TVertex, TEdge> visitedGraph)
Parameters
Type | Name | Description |
---|---|---|
IIncidenceGraph<TVertex, TEdge> | visitedGraph | Graph to visit. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
Properties
| Improve this Doc View SourceEdgesColors
Treated edges with their colors (colorized edges).
Declaration
public IDictionary<TEdge, GraphColor> EdgesColors { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<TEdge, GraphColor> |
MaxDepth
Gets or sets the maximum exploration depth, from the start vertex.
Declaration
public int MaxDepth { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | Maximum exploration depth. |
Remarks
Defaulted to int.MaxValue.
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Value is negative or equal to 0. |
Methods
| Improve this Doc View SourceInitialize()
Called on algorithm initialization step.
Declaration
protected override void Initialize()
Overrides
InternalCompute()
Algorithm compute step.
Declaration
protected override void InternalCompute()
Overrides
Events
| Improve this Doc View SourceBackEdge
Fired on the back edges in the graph.
Declaration
public event EdgeAction<TVertex, TEdge> BackEdge
Event Type
Type | Description |
---|---|
EdgeAction<TVertex, TEdge> |
DiscoverTreeEdge
Fired when an edge is discovered.
Declaration
public event EdgeEdgeAction<TVertex, TEdge> DiscoverTreeEdge
Event Type
Type | Description |
---|---|
EdgeEdgeAction<TVertex, TEdge> |
FinishEdge
Fired on an edge after all of its out edges have been added to the search tree and all of the adjacent vertices have been discovered (but before their out-edges have been examined).
Declaration
public event EdgeAction<TVertex, TEdge> FinishEdge
Event Type
Type | Description |
---|---|
EdgeAction<TVertex, TEdge> |
ForwardOrCrossEdge
Fired on forward or cross edges in the graph. (In an undirected graph this method is never called.)
Declaration
public event EdgeAction<TVertex, TEdge> ForwardOrCrossEdge
Event Type
Type | Description |
---|---|
EdgeAction<TVertex, TEdge> |
StartEdge
Fired when an edge starts to be treated.
Declaration
public event EdgeAction<TVertex, TEdge> StartEdge
Event Type
Type | Description |
---|---|
EdgeAction<TVertex, TEdge> |
StartVertex
Fired on the root vertex once before the start of the search from it.
Declaration
public event VertexAction<TVertex> StartVertex
Event Type
Type | Description |
---|---|
VertexAction<TVertex> |
TreeEdge
Invoked on each edge as it becomes a member of the edges that form the search tree. If you wish to record predecessors, do so at this event point.
Declaration
public event EdgeAction<TVertex, TEdge> TreeEdge
Event Type
Type | Description |
---|---|
EdgeAction<TVertex, TEdge> |