Template Function ADS::kruskal(int, std::vector<WeightedEdge<W>>, M&, long, MergeCounts *)
Defined in File MinimumSpanningTree.h
Function Documentation
-
template<class W, Mergeable M>
std::vector<WeightedEdge<W>> ADS::kruskal(int n, std::vector<WeightedEdge<W>> A, M &sets, long k = 0, MergeCounts *c = nullptr) kruskal() with the MFSET sets given, whose merge( u , v ) joins the components of u and v and tells whether they were apart [see MFSet.h]; its work in *c, if given
- Pre:
as kruskal(), sets has the components {0} , … , {n - 1}
- Post:
a minimum spanning forest (audit)