Class VertexColoringAlgorithm<TVertex, TEdge>
Algorithm that walk through a graph and color vertices with the minimum number of colors possible.
Inheritance
System.Object
AlgorithmBase<IUndirectedGraph<TVertex, TEdge>>
VertexColoringAlgorithm<TVertex, TEdge>
Inherited Members
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.VertexColoring
Assembly: QuikGraph.dll
Syntax
public sealed class VertexColoringAlgorithm<TVertex, TEdge> : AlgorithmBase<IUndirectedGraph<TVertex, TEdge>>, IAlgorithm<IUndirectedGraph<TVertex, TEdge>>, IComputation, IAlgorithmComponent where TEdge : IEdge<TVertex>
Type Parameters
Name | Description |
---|---|
TVertex | Vertex type. |
TEdge | Edge type. |
Constructors
| Improve this Doc View SourceVertexColoringAlgorithm(IUndirectedGraph<TVertex, TEdge>)
Initializes a new instance of the VertexColoringAlgorithm<TVertex, TEdge> class.
Declaration
public VertexColoringAlgorithm(IUndirectedGraph<TVertex, TEdge> visitedGraph)
Parameters
Type | Name | Description |
---|---|---|
IUndirectedGraph<TVertex, TEdge> | visitedGraph | Graph to visit. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|
Properties
| Improve this Doc View SourceColors
Vertices colors.
Declaration
public IDictionary<TVertex, int?> Colors { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<TVertex, System.Nullable<System.Int32>> |
Methods
| Improve this Doc View SourceInitialize()
Called on algorithm initialization step.
Declaration
protected override void Initialize()
Overrides
QuikGraph.Algorithms.AlgorithmBase<QuikGraph.IUndirectedGraph<TVertex, TEdge>>.Initialize()
|
Improve this Doc
View Source
InternalCompute()
Algorithm compute step.
Declaration
protected override void InternalCompute()
Overrides
QuikGraph.Algorithms.AlgorithmBase<QuikGraph.IUndirectedGraph<TVertex, TEdge>>.InternalCompute()
Events
| Improve this Doc View SourceVertexColored
Fired when a vertex is colored.
Declaration
public event VertexAction<TVertex> VertexColored
Event Type
Type | Description |
---|---|
VertexAction<TVertex> |