Show / Hide Table of Contents

Class CloneableVertexGraphExplorerAlgorithm<TVertex, TEdge>

Algorithm that explores a graph starting from a given vertex.

Inheritance
System.Object
AlgorithmBase<IMutableVertexAndEdgeSet<TVertex, TEdge>>
RootedAlgorithmBase<TVertex, IMutableVertexAndEdgeSet<TVertex, TEdge>>
CloneableVertexGraphExplorerAlgorithm<TVertex, TEdge>
Implements
IAlgorithm<IMutableVertexAndEdgeSet<TVertex, TEdge>>
IComputation
IAlgorithmComponent
ITreeBuilderAlgorithm<TVertex, TEdge>
Inherited Members
RootedAlgorithmBase<TVertex, IMutableVertexAndEdgeSet<TVertex, TEdge>>.TryGetRootVertex(TVertex)
RootedAlgorithmBase<TVertex, IMutableVertexAndEdgeSet<TVertex, TEdge>>.SetRootVertex(TVertex)
RootedAlgorithmBase<TVertex, IMutableVertexAndEdgeSet<TVertex, TEdge>>.ClearRootVertex()
RootedAlgorithmBase<TVertex, IMutableVertexAndEdgeSet<TVertex, TEdge>>.RootVertexChanged
RootedAlgorithmBase<TVertex, IMutableVertexAndEdgeSet<TVertex, TEdge>>.OnRootVertexChanged(EventArgs)
RootedAlgorithmBase<TVertex, IMutableVertexAndEdgeSet<TVertex, TEdge>>.GetAndAssertRootInGraph()
RootedAlgorithmBase<TVertex, IMutableVertexAndEdgeSet<TVertex, TEdge>>.AssertRootInGraph(TVertex)
RootedAlgorithmBase<TVertex, IMutableVertexAndEdgeSet<TVertex, TEdge>>.Compute(TVertex)
AlgorithmBase<IMutableVertexAndEdgeSet<TVertex, TEdge>>.SyncRoot
AlgorithmBase<IMutableVertexAndEdgeSet<TVertex, TEdge>>.State
AlgorithmBase<IMutableVertexAndEdgeSet<TVertex, TEdge>>.Compute()
AlgorithmBase<IMutableVertexAndEdgeSet<TVertex, TEdge>>.Abort()
AlgorithmBase<IMutableVertexAndEdgeSet<TVertex, TEdge>>.StateChanged
AlgorithmBase<IMutableVertexAndEdgeSet<TVertex, TEdge>>.OnStateChanged(EventArgs)
AlgorithmBase<IMutableVertexAndEdgeSet<TVertex, TEdge>>.Started
AlgorithmBase<IMutableVertexAndEdgeSet<TVertex, TEdge>>.OnStarted(EventArgs)
AlgorithmBase<IMutableVertexAndEdgeSet<TVertex, TEdge>>.Finished
AlgorithmBase<IMutableVertexAndEdgeSet<TVertex, TEdge>>.OnFinished(EventArgs)
AlgorithmBase<IMutableVertexAndEdgeSet<TVertex, TEdge>>.Aborted
AlgorithmBase<IMutableVertexAndEdgeSet<TVertex, TEdge>>.OnAborted(EventArgs)
AlgorithmBase<IMutableVertexAndEdgeSet<TVertex, TEdge>>.VisitedGraph
AlgorithmBase<IMutableVertexAndEdgeSet<TVertex, TEdge>>.Services
AlgorithmBase<IMutableVertexAndEdgeSet<TVertex, TEdge>>.GetService<T>()
AlgorithmBase<IMutableVertexAndEdgeSet<TVertex, TEdge>>.TryGetService<T>(T)
AlgorithmBase<IMutableVertexAndEdgeSet<TVertex, TEdge>>.TryGetService(Type, Object)
AlgorithmBase<IMutableVertexAndEdgeSet<TVertex, TEdge>>.ThrowIfCancellationRequested()
AlgorithmBase<IMutableVertexAndEdgeSet<TVertex, TEdge>>.Initialize()
AlgorithmBase<IMutableVertexAndEdgeSet<TVertex, TEdge>>.InternalCompute()
AlgorithmBase<IMutableVertexAndEdgeSet<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.Exploration
Assembly: QuikGraph.dll
Syntax
public sealed class CloneableVertexGraphExplorerAlgorithm<TVertex, TEdge> : RootedAlgorithmBase<TVertex, IMutableVertexAndEdgeSet<TVertex, TEdge>>, IAlgorithm<IMutableVertexAndEdgeSet<TVertex, TEdge>>, IComputation, IAlgorithmComponent, ITreeBuilderAlgorithm<TVertex, TEdge> where TVertex : ICloneable where TEdge : IEdge<TVertex>
Type Parameters
Name Description
TVertex

Vertex type.

TEdge

Edge type.

Constructors

| Improve this Doc View Source

CloneableVertexGraphExplorerAlgorithm(IAlgorithmComponent, IMutableVertexAndEdgeSet<TVertex, TEdge>)

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

Declaration
public CloneableVertexGraphExplorerAlgorithm(IAlgorithmComponent host, IMutableVertexAndEdgeSet<TVertex, TEdge> visitedGraph)
Parameters
Type Name Description
IAlgorithmComponent host

Host to use if set, otherwise use this reference.

IMutableVertexAndEdgeSet<TVertex, TEdge> visitedGraph

Graph to visit.

Exceptions
Type Condition
System.ArgumentNullException

visitedGraph is null.

| Improve this Doc View Source

CloneableVertexGraphExplorerAlgorithm(IMutableVertexAndEdgeSet<TVertex, TEdge>)

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

Declaration
public CloneableVertexGraphExplorerAlgorithm(IMutableVertexAndEdgeSet<TVertex, TEdge> visitedGraph)
Parameters
Type Name Description
IMutableVertexAndEdgeSet<TVertex, TEdge> visitedGraph

Graph to visit.

Exceptions
Type Condition
System.ArgumentNullException

visitedGraph is null.

Properties

| Improve this Doc View Source

AddEdgePredicate

Predicate that an edge must match to be added in the graph.

Declaration
public EdgePredicate<TVertex, TEdge> AddEdgePredicate { get; set; }
Property Value
Type Description
EdgePredicate<TVertex, TEdge>
Exceptions
Type Condition
System.ArgumentNullException

Set value is null.

| Improve this Doc View Source

AddVertexPredicate

Predicate that a vertex must match to be added in the graph.

Declaration
public VertexPredicate<TVertex> AddVertexPredicate { get; set; }
Property Value
Type Description
VertexPredicate<TVertex>
Exceptions
Type Condition
System.ArgumentNullException

Set value is null.

| Improve this Doc View Source

ExploreVertexPredicate

Predicate that checks if a given vertex should be explored or ignored.

Declaration
public VertexPredicate<TVertex> ExploreVertexPredicate { get; set; }
Property Value
Type Description
VertexPredicate<TVertex>
Exceptions
Type Condition
System.ArgumentNullException

Set value is null.

| Improve this Doc View Source

FinishedPredicate

Predicate that checks if the exploration is finished or not.

Declaration
public Predicate<CloneableVertexGraphExplorerAlgorithm<TVertex, TEdge>> FinishedPredicate { get; set; }
Property Value
Type Description
System.Predicate<CloneableVertexGraphExplorerAlgorithm<TVertex, TEdge>>
Exceptions
Type Condition
System.ArgumentNullException

Set value is null.

| Improve this Doc View Source

FinishedSuccessfully

Indicates if the algorithm finished successfully or not.

Declaration
public bool FinishedSuccessfully { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

UnExploredVertices

Gets the enumeration of unexplored vertices.

Declaration
public IEnumerable<TVertex> UnExploredVertices { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<TVertex>

Methods

| Improve this Doc View Source

AddTransitionFactories(IEnumerable<ITransitionFactory<TVertex, TEdge>>)

Adds new ITransitionFactory<TVertex, TEdge>s to this algorithm.

Declaration
public void AddTransitionFactories(IEnumerable<ITransitionFactory<TVertex, TEdge>> transitionFactories)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<ITransitionFactory<TVertex, TEdge>> transitionFactories

Transition factories to add.

Exceptions
Type Condition
System.ArgumentNullException

transitionFactories is null.

| Improve this Doc View Source

AddTransitionFactory(ITransitionFactory<TVertex, TEdge>)

Adds a new ITransitionFactory<TVertex, TEdge> to this algorithm.

Declaration
public void AddTransitionFactory(ITransitionFactory<TVertex, TEdge> transitionFactory)
Parameters
Type Name Description
ITransitionFactory<TVertex, TEdge> transitionFactory

Transition factory to add.

Exceptions
Type Condition
System.ArgumentNullException

transitionFactory is null.

| Improve this Doc View Source

ClearTransitionFactories()

Clears all ITransitionFactory<TVertex, TEdge> from this algorithm.

Declaration
public void ClearTransitionFactories()
| Improve this Doc View Source

Compute(TVertex)

Runs the algorithm with the given root vertex.

Declaration
public override void Compute(TVertex root)
Parameters
Type Name Description
TVertex root

Root vertex.

Overrides
QuikGraph.Algorithms.RootedAlgorithmBase<TVertex, QuikGraph.IMutableVertexAndEdgeSet<TVertex, TEdge>>.Compute(TVertex)
Exceptions
Type Condition
System.ArgumentNullException

root is null.

System.ArgumentException

root is not part of VisitedGraph.

System.InvalidOperationException

Something went wrong when running the algorithm.

| Improve this Doc View Source

ContainsTransitionFactory(ITransitionFactory<TVertex, TEdge>)

Checks if this algorithm contains the given transitionFactory.

Declaration
public bool ContainsTransitionFactory(ITransitionFactory<TVertex, TEdge> transitionFactory)
Parameters
Type Name Description
ITransitionFactory<TVertex, TEdge> transitionFactory

Transition factory to check.

Returns
Type Description
System.Boolean
| Improve this Doc View Source

InternalCompute()

Algorithm compute step.

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

RemoveTransitionFactory(ITransitionFactory<TVertex, TEdge>)

Removes the given transitionFactory from this algorithm.

Declaration
public bool RemoveTransitionFactory(ITransitionFactory<TVertex, TEdge> transitionFactory)
Parameters
Type Name Description
ITransitionFactory<TVertex, TEdge> transitionFactory

Transition factory to remove.

Returns
Type Description
System.Boolean

Events

| Improve this Doc View Source

BackEdge

Fired when a back edge is encountered.

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

DiscoverVertex

Fired when a vertex is discovered.

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

EdgeSkipped

Fired when an edge was skipped from exploration due to failed vertex or edge predicate check.

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

TreeEdge

Fired when an edge is encountered.

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

Implements

IAlgorithm<TGraph>
IComputation
IAlgorithmComponent
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