Show / Hide Table of Contents

Class EdgeDepthFirstSearchAlgorithm<TVertex, TEdge>

A edge depth first search algorithm for directed graphs.

Inheritance
System.Object
AlgorithmBase<IEdgeListAndIncidenceGraph<TVertex, TEdge>>
RootedAlgorithmBase<TVertex, IEdgeListAndIncidenceGraph<TVertex, TEdge>>
EdgeDepthFirstSearchAlgorithm<TVertex, TEdge>
Implements
IAlgorithm<IEdgeListAndIncidenceGraph<TVertex, TEdge>>
IComputation
IAlgorithmComponent
IEdgeColorizerAlgorithm<TVertex, TEdge>
IEdgePredecessorRecorderAlgorithm<TVertex, TEdge>
ITreeBuilderAlgorithm<TVertex, TEdge>
Inherited Members
RootedAlgorithmBase<TVertex, IEdgeListAndIncidenceGraph<TVertex, TEdge>>.TryGetRootVertex(TVertex)
RootedAlgorithmBase<TVertex, IEdgeListAndIncidenceGraph<TVertex, TEdge>>.SetRootVertex(TVertex)
RootedAlgorithmBase<TVertex, IEdgeListAndIncidenceGraph<TVertex, TEdge>>.ClearRootVertex()
RootedAlgorithmBase<TVertex, IEdgeListAndIncidenceGraph<TVertex, TEdge>>.RootVertexChanged
RootedAlgorithmBase<TVertex, IEdgeListAndIncidenceGraph<TVertex, TEdge>>.OnRootVertexChanged(EventArgs)
RootedAlgorithmBase<TVertex, IEdgeListAndIncidenceGraph<TVertex, TEdge>>.GetAndAssertRootInGraph()
RootedAlgorithmBase<TVertex, IEdgeListAndIncidenceGraph<TVertex, TEdge>>.AssertRootInGraph(TVertex)
RootedAlgorithmBase<TVertex, IEdgeListAndIncidenceGraph<TVertex, TEdge>>.Compute(TVertex)
AlgorithmBase<IEdgeListAndIncidenceGraph<TVertex, TEdge>>.SyncRoot
AlgorithmBase<IEdgeListAndIncidenceGraph<TVertex, TEdge>>.State
AlgorithmBase<IEdgeListAndIncidenceGraph<TVertex, TEdge>>.Compute()
AlgorithmBase<IEdgeListAndIncidenceGraph<TVertex, TEdge>>.Abort()
AlgorithmBase<IEdgeListAndIncidenceGraph<TVertex, TEdge>>.StateChanged
AlgorithmBase<IEdgeListAndIncidenceGraph<TVertex, TEdge>>.OnStateChanged(EventArgs)
AlgorithmBase<IEdgeListAndIncidenceGraph<TVertex, TEdge>>.Started
AlgorithmBase<IEdgeListAndIncidenceGraph<TVertex, TEdge>>.OnStarted(EventArgs)
AlgorithmBase<IEdgeListAndIncidenceGraph<TVertex, TEdge>>.Finished
AlgorithmBase<IEdgeListAndIncidenceGraph<TVertex, TEdge>>.OnFinished(EventArgs)
AlgorithmBase<IEdgeListAndIncidenceGraph<TVertex, TEdge>>.Aborted
AlgorithmBase<IEdgeListAndIncidenceGraph<TVertex, TEdge>>.OnAborted(EventArgs)
AlgorithmBase<IEdgeListAndIncidenceGraph<TVertex, TEdge>>.VisitedGraph
AlgorithmBase<IEdgeListAndIncidenceGraph<TVertex, TEdge>>.Services
AlgorithmBase<IEdgeListAndIncidenceGraph<TVertex, TEdge>>.GetService<T>()
AlgorithmBase<IEdgeListAndIncidenceGraph<TVertex, TEdge>>.TryGetService<T>(T)
AlgorithmBase<IEdgeListAndIncidenceGraph<TVertex, TEdge>>.TryGetService(Type, Object)
AlgorithmBase<IEdgeListAndIncidenceGraph<TVertex, TEdge>>.ThrowIfCancellationRequested()
AlgorithmBase<IEdgeListAndIncidenceGraph<TVertex, TEdge>>.Initialize()
AlgorithmBase<IEdgeListAndIncidenceGraph<TVertex, TEdge>>.InternalCompute()
AlgorithmBase<IEdgeListAndIncidenceGraph<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 EdgeDepthFirstSearchAlgorithm<TVertex, TEdge> : RootedAlgorithmBase<TVertex, IEdgeListAndIncidenceGraph<TVertex, TEdge>>, IAlgorithm<IEdgeListAndIncidenceGraph<TVertex, TEdge>>, IComputation, IAlgorithmComponent, IEdgeColorizerAlgorithm<TVertex, TEdge>, IEdgePredecessorRecorderAlgorithm<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 algorithm where the edges are color marked instead of the vertices.

Constructors

| Improve this Doc View Source

EdgeDepthFirstSearchAlgorithm(IAlgorithmComponent, IEdgeListAndIncidenceGraph<TVertex, TEdge>, IDictionary<TEdge, GraphColor>)

Initializes a new instance of the EdgeDepthFirstSearchAlgorithm<TVertex, TEdge> class.

Declaration
public EdgeDepthFirstSearchAlgorithm(IAlgorithmComponent host, IEdgeListAndIncidenceGraph<TVertex, TEdge> visitedGraph, IDictionary<TEdge, GraphColor> edgesColors)
Parameters
Type Name Description
IAlgorithmComponent host

Host to use if set, otherwise use this reference.

IEdgeListAndIncidenceGraph<TVertex, TEdge> visitedGraph

Graph to visit.

System.Collections.Generic.IDictionary<TEdge, GraphColor> edgesColors

Edges associated to their colors (treatment states).

Exceptions
Type Condition
System.ArgumentNullException

visitedGraph is null.

System.ArgumentNullException

edgesColors is null.

| Improve this Doc View Source

EdgeDepthFirstSearchAlgorithm(IEdgeListAndIncidenceGraph<TVertex, TEdge>)

Initializes a new instance of the EdgeDepthFirstSearchAlgorithm<TVertex, TEdge> class.

Declaration
public EdgeDepthFirstSearchAlgorithm(IEdgeListAndIncidenceGraph<TVertex, TEdge> visitedGraph)
Parameters
Type Name Description
IEdgeListAndIncidenceGraph<TVertex, TEdge> visitedGraph

Graph to visit.

Exceptions
Type Condition
System.ArgumentNullException

visitedGraph is null.

| Improve this Doc View Source

EdgeDepthFirstSearchAlgorithm(IEdgeListAndIncidenceGraph<TVertex, TEdge>, IDictionary<TEdge, GraphColor>)

Initializes a new instance of the EdgeDepthFirstSearchAlgorithm<TVertex, TEdge> class.

Declaration
public EdgeDepthFirstSearchAlgorithm(IEdgeListAndIncidenceGraph<TVertex, TEdge> visitedGraph, IDictionary<TEdge, GraphColor> edgesColors)
Parameters
Type Name Description
IEdgeListAndIncidenceGraph<TVertex, TEdge> visitedGraph

Graph to visit.

System.Collections.Generic.IDictionary<TEdge, GraphColor> edgesColors

Edges associated to their colors (treatment states).

Exceptions
Type Condition
System.ArgumentNullException

visitedGraph is null.

System.ArgumentNullException

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

| Improve this Doc View Source

ProcessAllComponents

In case a root vertex has been set, indicates if the algorithm should walk through graph parts of other components than the root component.

Declaration
public bool ProcessAllComponents { get; set; }
Property Value
Type Description
System.Boolean

Methods

| Improve this Doc View Source

Initialize()

Called on algorithm initialization step.

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

InternalCompute()

Algorithm compute step.

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

Events

| Improve this Doc View Source

BackEdge

Fired when an edge is going to be treated when coming from a gray edge.

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 when an edge is fully treated.

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

ForwardOrCrossEdge

Fired when an edge is going to be treated when coming from a black edge.

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

InitializeEdge

Fired when an edge is initialized.

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

Fired when an edge is going to be treated when coming from a white edge.

Declaration
public event EdgeAction<TVertex, TEdge> TreeEdge
Event Type
Type Description
EdgeAction<TVertex, TEdge>

Implements

IAlgorithm<TGraph>
IComputation
IAlgorithmComponent
IEdgeColorizerAlgorithm<TVertex, TEdge>
IEdgePredecessorRecorderAlgorithm<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