Show / Hide Table of Contents

Class ImplicitEdgeDepthFirstSearchAlgorithm<TVertex, TEdge>

An edge depth first search algorithm for implicit directed graphs.

Inheritance
System.Object
AlgorithmBase<IIncidenceGraph<TVertex, TEdge>>
RootedAlgorithmBase<TVertex, IIncidenceGraph<TVertex, TEdge>>
ImplicitEdgeDepthFirstSearchAlgorithm<TVertex, TEdge>
Implements
IAlgorithm<IIncidenceGraph<TVertex, TEdge>>
IComputation
IAlgorithmComponent
IEdgeColorizerAlgorithm<TVertex, TEdge>
ITreeBuilderAlgorithm<TVertex, TEdge>
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 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 Source

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

visitedGraph is null.

| Improve this Doc View Source

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

visitedGraph is null.

Properties

| Improve this Doc View Source

EdgesColors

Treated edges with their colors (colorized edges).

Declaration
public IDictionary<TEdge, GraphColor> EdgesColors { get; }
Property Value
Type Description
System.Collections.Generic.IDictionary<TEdge, GraphColor>
| 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.

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

DiscoverTreeEdge

Fired when an edge is discovered.

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

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

StartEdge

Fired when an edge starts to be treated.

Declaration
public event EdgeAction<TVertex, TEdge> StartEdge
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

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>

Implements

IAlgorithm<TGraph>
IComputation
IAlgorithmComponent
IEdgeColorizerAlgorithm<TVertex, TEdge>
ITreeBuilderAlgorithm<TVertex, TEdge>

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