boost minimum spanning tree, how to do depth first?
问题 I would like to construct a minimum spanning tree using the kruskal_minimum_spanning_tree algorithm available in the boost graph library. The output of the kruskal_minimum_spanning_tree(g, std::back_inserter(spanning_tree)); from the BGL example is a simple list of edges. However, I would like to process the tree with a depth first algorithm and do not know how to do that. Could someone give me a hint on this? 回答1: Update : sehe gives an updated and more efficient solution here: https:/