Show / Hide Table of Contents

Class ImplicitDepthFirstSearchAlgorithm<TVertex, TEdge>

A depth first search algorithm for implicit directed graphs.

Inheritance
System.Object
AlgorithmBase<IIncidenceGraph<TVertex, TEdge>>
RootedAlgorithmBase<TVertex, IIncidenceGraph<TVertex, TEdge>>
ImplicitDepthFirstSearchAlgorithm<TVertex, TEdge>
Implements
IAlgorithm<IIncidenceGraph<TVertex, TEdge>>
IComputation
IAlgorithmComponent
IVertexPredecessorRecorderAlgorithm<TVertex, TEdge>
ITreeBuilderAlgorithm<TVertex, TEdge>
IVertexTimeStamperAlgorithm<TVertex>
Inherited Members
RootedAlgorithmBase<TVertex, IIncidenceGraph<TVertex, TEdge>>.TryGetRootVertex(TVertex)
RootedAlgorithmBase<TVertex, IIncidenceGraph<TVertex, TEdge>>.SetRootVertex(TVertex)
RootedAlgorithmBase<TVertex, IIncidenceGraph<TVertex, TEdge>>.ClearRootVertex()
RootedAlgorithmBase<TVertex, IIncidenceGraph<TVertex, TEdge>>.RootVertexChanged
RootedAlgorithmBase<TVertex, IIncidenceGraph<TVertex, TEdge>>.OnRootVertexChanged(EventArgs)
RootedAlgorithmBase<TVertex, IIncidenceGraph<TVertex, TEdge>>.GetAndAssertRootInGraph()
RootedAlgorithmBase<TVertex, IIncidenceGraph<TVertex, TEdge>>.AssertRootInGraph(TVertex)
RootedAlgorithmBase<TVertex, IIncidenceGraph<TVertex, TEdge>>.Compute(TVertex)
AlgorithmBase<IIncidenceGraph<TVertex, TEdge>>.SyncRoot
AlgorithmBase<IIncidenceGraph<TVertex, TEdge>>.State
AlgorithmBase<IIncidenceGraph<TVertex, TEdge>>.Compute()
AlgorithmBase<IIncidenceGraph<TVertex, TEdge>>.Abort()
AlgorithmBase<IIncidenceGraph<TVertex, TEdge>>.StateChanged
AlgorithmBase<IIncidenceGraph<TVertex, TEdge>>.OnStateChanged(EventArgs)
AlgorithmBase<IIncidenceGraph<TVertex, TEdge>>.Started
AlgorithmBase<IIncidenceGraph<TVertex, TEdge>>.OnStarted(EventArgs)
AlgorithmBase<IIncidenceGraph<TVertex, TEdge>>.Finished
AlgorithmBase<IIncidenceGraph<TVertex, TEdge>>.OnFinished(EventArgs)
AlgorithmBase<IIncidenceGraph<TVertex, TEdge>>.Aborted
AlgorithmBase<IIncidenceGraph<TVertex, TEdge>>.OnAborted(EventArgs)
AlgorithmBase<IIncidenceGraph<TVertex, TEdge>>.VisitedGraph
AlgorithmBase<IIncidenceGraph<TVertex, TEdge>>.Services
AlgorithmBase<IIncidenceGraph<TVertex, TEdge>>.GetService<T>()
AlgorithmBase<IIncidenceGraph<TVertex, TEdge>>.TryGetService<T>(T)
AlgorithmBase<IIncidenceGraph<TVertex, TEdge>>.TryGetService(Type, Object)
AlgorithmBase<IIncidenceGraph<TVertex, TEdge>>.ThrowIfCancellationRequested()
AlgorithmBase<IIncidenceGraph<TVertex, TEdge>>.Initialize()
AlgorithmBase<IIncidenceGraph<TVertex, TEdge>>.InternalCompute()
AlgorithmBase<IIncidenceGraph<TVertex, TEdge>>.Clean()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
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 Source

ImplicitDepthFirstSearchAlgorithm(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

visitedGraph is null.

| Improve this Doc View Source

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

visitedGraph is null.

Properties

| Improve this Doc View Source

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.

| Improve this Doc View Source

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 Source

Initialize()

Called on algorithm initialization step.

Declaration
protected override void Initialize()
Overrides
QuikGraph.Algorithms.AlgorithmBase<QuikGraph.IIncidenceGraph<TVertex, TEdge>>.Initialize()
| Improve this Doc View Source

InternalCompute()

Algorithm compute step.

Declaration
protected override void InternalCompute()
Overrides
QuikGraph.Algorithms.AlgorithmBase<QuikGraph.IIncidenceGraph<TVertex, TEdge>>.InternalCompute()

Events

| Improve this Doc View Source

BackEdge

Fired on the back edges in the graph.

Declaration
public event EdgeAction<TVertex, TEdge> BackEdge
Event Type
Type Description
EdgeAction<TVertex, TEdge>
| Improve this Doc View Source

DiscoverVertex

Invoked when a vertex is encountered for the first time.

Declaration
public event VertexAction<TVertex> DiscoverVertex
Event Type
Type Description
VertexAction<TVertex>
| Improve this Doc View Source

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>
| Improve this Doc View Source

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>
| Improve this Doc View Source

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>
| Improve this Doc View Source

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>
| Improve this Doc View Source

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>

Implements

IAlgorithm<TGraph>
IComputation
IAlgorithmComponent
IVertexPredecessorRecorderAlgorithm<TVertex, TEdge>
ITreeBuilderAlgorithm<TVertex, TEdge>
IVertexTimeStamperAlgorithm<TVertex>

Extension Methods

GraphMLExtensions.SerializeToGraphML<TVertex, TEdge, TGraph>(TGraph, String)
GraphMLExtensions.SerializeToGraphML<TVertex, TEdge, TGraph>(TGraph, String, VertexIdentity<TVertex>, EdgeIdentity<TVertex, TEdge>)
GraphMLExtensions.SerializeToGraphML<TVertex, TEdge, TGraph>(TGraph, XmlWriter)
GraphMLExtensions.SerializeToGraphML<TVertex, TEdge, TGraph>(TGraph, XmlWriter, VertexIdentity<TVertex>, EdgeIdentity<TVertex, TEdge>)
GraphMLExtensions.DeserializeFromGraphML<TVertex, TEdge, TGraph>(TGraph, XmlReader, IdentifiableVertexFactory<TVertex>, IdentifiableEdgeFactory<TVertex, TEdge>)
GraphMLExtensions.DeserializeFromGraphML<TVertex, TEdge, TGraph>(TGraph, TextReader, IdentifiableVertexFactory<TVertex>, IdentifiableEdgeFactory<TVertex, TEdge>)
GraphMLExtensions.DeserializeFromGraphML<TVertex, TEdge, TGraph>(TGraph, String, IdentifiableVertexFactory<TVertex>, IdentifiableEdgeFactory<TVertex, TEdge>)
GraphMLExtensions.DeserializeAndValidateFromGraphML<TVertex, TEdge, TGraph>(TGraph, TextReader, IdentifiableVertexFactory<TVertex>, IdentifiableEdgeFactory<TVertex, TEdge>)
SerializationExtensions.SerializeToXml<TVertex, TEdge, TGraph>(TGraph, XmlWriter, VertexIdentity<TVertex>, EdgeIdentity<TVertex, TEdge>, String, String, String, String)
SerializationExtensions.SerializeToXml<TVertex, TEdge, TGraph>(TGraph, XmlWriter, VertexIdentity<TVertex>, EdgeIdentity<TVertex, TEdge>, String, String, String, String, Action<XmlWriter, TGraph>, Action<XmlWriter, TVertex>, Action<XmlWriter, TEdge>)
  • Improve this Doc
  • View Source
In This Article
Back to top QuikGraph