|
Boost Users : |
Subject: Re: [Boost-users] BGL: counting connected components subgraph
From: Arman Khalatyan (arm2arm_at_[hidden])
Date: 2009-11-27 00:53:27
Thanks, Kruskal's algorithm works nice,
I would be nice to have in the BGL examples list how to cut and traverse
over the disconnected subgraphs/components.
On Wed, Nov 25, 2009 at 2:07 PM, Gábor Szuromi <kukkerman_at_[hidden]> wrote:
> On second thought Prim's algorithm computes only the spanning tree of
> the component the starting vertex belongs to. So instead you can use
> the edge list returned by Kruskal's algorithm to mark tree edges and
> then use filtered_graph to hide non-marked edges and transform the
> original graph into a forest without creating a new graph. The
> predecessor map can be used to identify the root node of trees.
>
> Gabe
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
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