Boost logo

Boost Users :

Subject: Re: [Boost-users] [BGL] Issue using connected_components
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2011-12-07 14:19:46


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


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