Boost logo

Boost Users :

Subject: Re: [Boost-users] BGL: counting connected components subgraph
From: Gábor Szuromi (kukkerman_at_[hidden])
Date: 2009-11-24 17:41:47


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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net