Template Function ADS::prim(const G&, int, Q&, FrontierCounts *)
Defined in File MinimumSpanningTree.h
Function Documentation
-
template<Graph G, PriorityQueue Q>
std::vector<int> ADS::prim(const G &g, int r, Q &q, FrontierCounts *c = nullptr) prim() on the priority queue q given [see PriorityQueue.h], whose priority is the weight or the pair ( weight , node ), which breaks the ties by the names of the nodes; its work in *c, if given
- Pre:
the graph is unoriented, r is a node, q is empty
- Post:
a minimum spanning tree of the component of r (audit)