Boost logo

Boost Users :

From: John Krajewski (johnnyk1_at_[hidden])
Date: 2006-05-01 07:03:40

Hi all,
The function "strong_components" produces a mapping from vertex to
component - but what I need is a mapping the other way, from component to

Now of course I could go through the property_map, query each vertex, and
create the new map myself, but theres got to be a better way. The map is
just a writable_property_map concept, so theoretically I should be able to
create my own somehow that will swap the key and value, but I'm not sure how
I would do that. Any suggestions?

I also want to create a graph of the strongly connected components, but I
suppose theres no tricky way to do this - just go through each vertex in the
returned map and add its connections to the strong component's connections
(though there's probably something tricky I could do with iterators to make
this automatic)

Thanks for any help, my mind is still adjusting to being warped by this
generic programming stuff :)

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at