Re: [Boost-users] [BGL] Issue using connected_components
Hi, thanks again for replying. I may sound stupid, but again, I cannot find what is the type of the component map to pass to connected_components when the graph is of type adjacency_list<listS, listS, undirectedS>. The following does not work (see previous email for the whole code): map<FeatureGraph::vertex_descriptor, graph_traits<FeatureGraph>::vertices_size_type> vertex2component; vertex2component.insert(make_pair(u, 0)); associative_property_map< map<graph_traits<FeatureGraph>::vertex_descriptor, graph_traits<FeatureGraph>::vertices_size_type> > components(vertex2component); Can someone please give me the declaration of the component map, and how to pass it to connected_components? Thanks, Nicolas On 11-12-08 02:08 PM, boost-users-request@lists.boost.org wrote:
If you use an associative property map, you will not need a vertex index map. See http://www.boost.org/doc/libs/1_48_0/libs/property_map/doc/associative_prope... for documentation on how to create one.
-- Jeremiah Willcock
-- Nicolas Saunier, ing. jr, Ph.D. Professeur Adjoint / Assistant Professor Département des génies civil, géologique et des mines (CGM) École Polytechnique de Montréal http://nicolas.saunier.confins.net
participants (1)
-
Nicolas Saunier