Table of Contents

Class LazyPrimMstDWayHeap<TWeight>

Namespace
AlgorithmsSW.EdgeWeightedGraph
Assembly
AlgorithmsSW.dll

A lazy implementation of Prim's algorithm for finding the minimum spanning tree of a weighted graph, using a N-heap.

public class LazyPrimMstDWayHeap<TWeight> : IMst<TWeight> where TWeight : INumber<TWeight>

Type Parameters

TWeight

The type of the edge weights.

Inheritance
LazyPrimMstDWayHeap<TWeight>
Implements
IMst<TWeight>
Inherited Members
Extension Methods

Constructors

LazyPrimMstDWayHeap(IReadOnlyEdgeWeightedGraph<TWeight>, int)

Initializes a new instance of the LazyPrimMstDWayHeap<TWeight> class.

public LazyPrimMstDWayHeap(IReadOnlyEdgeWeightedGraph<TWeight> graph, int heapDegree)

Parameters

graph IReadOnlyEdgeWeightedGraph<TWeight>

The graph to find the minimum spanning tree of.

heapDegree int

The 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>>