Class KruskalMinimumSpanningTreeAlgorithm<TVertex, TEdge>
Kruskal minimum spanning tree algorithm implementation.
Inheritance
System.Object
AlgorithmBase<IUndirectedGraph<TVertex, TEdge>>
KruskalMinimumSpanningTreeAlgorithm<TVertex, TEdge>
Implements
IMinimumSpanningTreeAlgorithm<TVertex, TEdge>
IAlgorithm<IUndirectedGraph<TVertex, TEdge>>
ITreeBuilderAlgorithm<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.MinimumSpanningTree
Assembly: QuikGraph.dll
Syntax
public sealed class KruskalMinimumSpanningTreeAlgorithm<TVertex, TEdge> : AlgorithmBase<IUndirectedGraph<TVertex, TEdge>>, IAlgorithmComponent, IMinimumSpanningTreeAlgorithm<TVertex, TEdge>, IAlgorithm<IUndirectedGraph<TVertex, TEdge>>, IComputation, ITreeBuilderAlgorithm<TVertex, TEdge> where TEdge : IEdge<TVertex>
Type Parameters
| Name | Description |
|---|---|
| TVertex | Vertex type. |
| TEdge | Edge type. |
Constructors
| Improve this Doc View SourceKruskalMinimumSpanningTreeAlgorithm(IAlgorithmComponent, IUndirectedGraph<TVertex, TEdge>, Func<TEdge, Double>)
Initializes a new instance of the KruskalMinimumSpanningTreeAlgorithm<TVertex, TEdge> class.
Declaration
public KruskalMinimumSpanningTreeAlgorithm(IAlgorithmComponent host, IUndirectedGraph<TVertex, TEdge> visitedGraph, Func<TEdge, double> edgeWeights)
Parameters
| Type | Name | Description |
|---|---|---|
| IAlgorithmComponent | host | Host to use if set, otherwise use this reference. |
| IUndirectedGraph<TVertex, TEdge> | visitedGraph | Graph to visit. |
| System.Func<TEdge, System.Double> | edgeWeights | Function that computes the weight for a given edge. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException |
|
| System.ArgumentNullException |
|
KruskalMinimumSpanningTreeAlgorithm(IUndirectedGraph<TVertex, TEdge>, Func<TEdge, Double>)
Initializes a new instance of the KruskalMinimumSpanningTreeAlgorithm<TVertex, TEdge> class.
Declaration
public KruskalMinimumSpanningTreeAlgorithm(IUndirectedGraph<TVertex, TEdge> visitedGraph, Func<TEdge, double> edgeWeights)
Parameters
| Type | Name | Description |
|---|---|---|
| IUndirectedGraph<TVertex, TEdge> | visitedGraph | Graph to visit. |
| System.Func<TEdge, System.Double> | edgeWeights | Function that computes the weight for a given edge. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException |
|
| System.ArgumentNullException |
|
Methods
| Improve this Doc View SourceInternalCompute()
Algorithm compute step.
Declaration
protected override void InternalCompute()
Overrides
QuikGraph.Algorithms.AlgorithmBase<QuikGraph.IUndirectedGraph<TVertex, TEdge>>.InternalCompute()
Events
| Improve this Doc View SourceExamineEdge
Fired when an edge is going to be analyzed.
Declaration
public event EdgeAction<TVertex, TEdge> ExamineEdge
Event Type
| Type | Description |
|---|---|
| EdgeAction<TVertex, TEdge> |
TreeEdge
Fired when an edge is encountered.
Declaration
public event EdgeAction<TVertex, TEdge> TreeEdge
Event Type
| Type | Description |
|---|---|
| EdgeAction<TVertex, TEdge> |