Show / Hide Table of Contents

Class IncrementalConnectedComponentsAlgorithm<TVertex, TEdge>

Algorithm that incrementally computes connected components of a growing graph.

Inheritance
System.Object
AlgorithmBase<IMutableVertexAndEdgeSet<TVertex, TEdge>>
IncrementalConnectedComponentsAlgorithm<TVertex, TEdge>
Implements
IAlgorithm<IMutableVertexAndEdgeSet<TVertex, TEdge>>
IComputation
IAlgorithmComponent
System.IDisposable
Inherited Members
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.ConnectedComponents
Assembly: QuikGraph.dll
Syntax
public sealed class IncrementalConnectedComponentsAlgorithm<TVertex, TEdge> : AlgorithmBase<IMutableVertexAndEdgeSet<TVertex, TEdge>>, IAlgorithm<IMutableVertexAndEdgeSet<TVertex, TEdge>>, IComputation, IAlgorithmComponent, IDisposable where TEdge : IEdge<TVertex>
Type Parameters
Name Description
TVertex

Vertex type.

TEdge

Edge type.

Constructors

| Improve this Doc View Source

IncrementalConnectedComponentsAlgorithm(IAlgorithmComponent, IMutableVertexAndEdgeSet<TVertex, TEdge>)

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

Declaration
public IncrementalConnectedComponentsAlgorithm(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

IncrementalConnectedComponentsAlgorithm(IMutableVertexAndEdgeSet<TVertex, TEdge>)

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

Declaration
public IncrementalConnectedComponentsAlgorithm(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

ComponentCount

Number of components.

Declaration
public int ComponentCount { get; }
Property Value
Type Description
System.Int32
Exceptions
Type Condition
System.InvalidOperationException

The algorithm has not been run.

Methods

| Improve this Doc View Source

Dispose()

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

GetComponents()

Gets a copy of the connected components. Key is the number of components, Value contains the vertex -> component index map.

Declaration
public KeyValuePair<int, IDictionary<TVertex, int>> GetComponents()
Returns
Type Description
System.Collections.Generic.KeyValuePair<System.Int32, System.Collections.Generic.IDictionary<TVertex, System.Int32>>

Number of components associated to components vertex mapping.

Exceptions
Type Condition
System.InvalidOperationException

The algorithm has not been run.

| Improve this Doc View Source

InternalCompute()

Algorithm compute step.

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

Implements

IAlgorithm<TGraph>
IComputation
IAlgorithmComponent
System.IDisposable

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