Class ImplicitDepthFirstSearchAlgorithm<TVertex, TEdge>
A depth first search algorithm for implicit directed graphs.
Inheritance
Implements
Inherited Members
Namespace: QuikGraph.Algorithms.Search
Assembly: QuikGraph.dll
Syntax
public sealed class ImplicitDepthFirstSearchAlgorithm<TVertex, TEdge> : RootedAlgorithmBase<TVertex, IIncidenceGraph<TVertex, TEdge>>, IAlgorithm<IIncidenceGraph<TVertex, TEdge>>, IComputation, IAlgorithmComponent, IVertexPredecessorRecorderAlgorithm<TVertex, TEdge>, ITreeBuilderAlgorithm<TVertex, TEdge>, IVertexTimeStamperAlgorithm<TVertex> where TEdge : IEdge<TVertex>
Type Parameters
Name | Description |
---|---|
TVertex | Vertex type. |
TEdge | Edge type. |
Constructors
| Improve this Doc View SourceImplicitDepthFirstSearchAlgorithm(IAlgorithmComponent, IIncidenceGraph<TVertex, TEdge>)
Initializes a new instance of the ImplicitDepthFirstSearchAlgorithm<TVertex, TEdge> class.
Declaration
public ImplicitDepthFirstSearchAlgorithm(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 |
|
ImplicitDepthFirstSearchAlgorithm(IIncidenceGraph<TVertex, TEdge>)
Initializes a new instance of the ImplicitDepthFirstSearchAlgorithm<TVertex, TEdge> class.
Declaration
public ImplicitDepthFirstSearchAlgorithm(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 SourceMaxDepth
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. |
VerticesColors
Stores vertices associated to their colors (treatment state).
Declaration
public IDictionary<TVertex, GraphColor> VerticesColors { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<TVertex, GraphColor> |
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> |
DiscoverVertex
Invoked when a vertex is encountered for the first time.
Declaration
public event VertexAction<TVertex> DiscoverVertex
Event Type
Type | Description |
---|---|
VertexAction<TVertex> |
ExamineEdge
Invoked on every out-edge of each vertex after it is discovered.
Declaration
public event EdgeAction<TVertex, TEdge> ExamineEdge
Event Type
Type | Description |
---|---|
EdgeAction<TVertex, TEdge> |
FinishVertex
Fired on a vertex 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 VertexAction<TVertex> FinishVertex
Event Type
Type | Description |
---|---|
VertexAction<TVertex> |
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> |
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
Fired 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> |