[BGL] Issue using connected_components
Hi,
here is a simplified code sample that I cannot get to work. I use
bundled properties for an undirected graph and I do not find what should
be the type of the component map (or property map) that should be passed
as the second argument of the connected_components function. The sample
is useless since only integers are for vertices.
#include
On Wed, 7 Dec 2011, Nicolas Saunier wrote:
Hi,
here is a simplified code sample that I cannot get to work. I use bundled properties for an undirected graph and I do not find what should be the type of the component map (or property map) that should be passed as the second argument of the connected_components function. The sample is useless since only integers are for vertices.
The normal vector_property_map class does not work for adjacency_list graphs with a listS vertex container unless you define a vertex_index_map. Is there a reason you can't use vecS as the vertex container in your graph? If you truly need listS, you will need to create a vertex index map, fill it in before you create the property map, and pass it to the vector_property_map constructor (and as a type argument to that class). -- Jeremiah Willcock
participants (2)
-
Jeremiah Willcock
-
Nicolas Saunier