Class KruskalMstDWayHeap<TWeight>
- Namespace
- AlgorithmsSW.EdgeWeightedGraph
- Assembly
- AlgorithmsSW.dll
An implementation of Kruskal's algorithm for finding the minimum spanning tree of a weighted graph, using a N-heap.
public class KruskalMstDWayHeap<TWeight> : IMst<TWeight> where TWeight : INumber<TWeight>
Type Parameters
TWeight
The type of the edge weights.
- Inheritance
-
KruskalMstDWayHeap<TWeight>
- Implements
-
IMst<TWeight>
- Inherited Members
- Extension Methods
Constructors
KruskalMstDWayHeap(IEdgeWeightedGraph<TWeight>, int)
Initializes a new instance of the KruskalMstDWayHeap<TWeight> class.
public KruskalMstDWayHeap(IEdgeWeightedGraph<TWeight> graph, int heapDegree)
Parameters
graph
IEdgeWeightedGraph<TWeight>The graph to find the minimum spanning tree of.
heapDegree
intThe degree of the heap to use.
Properties
Edges
Gets the edges that is part of the minimum spanning tree.
public IEnumerable<Edge<TWeight>> Edges { get; }
Property Value
- IEnumerable<Edge<TWeight>>