
24 Nov
2009
24 Nov
'09
10:41 p.m.
Hi!
How to walk over those separate trees?
If you need the trees too I suggest using prim_minimum_spanning_tree becuse the predecessor map in Kruskal's algorithm is used for the disjoint-set data structure to indicate which set a particular vertex is in so it cannot be used walking the tree. I think prim_minimum_spanning_tree is a better choice here because it supports dijkstra visitors so you can mark tree edges on-the-fly and then use a filtered_graph to hide every non-marked edges to walk the trees. You can use the predecessor map exactly like in the first method to identify root vertices. Gabe