|
Boost Users : |
Subject: Re: [Boost-users] [BGL] Issue using connected_components
From: Nicolas Saunier (nicolas.saunier_at_[hidden])
Date: 2011-12-08 15:24:51
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_at_[hidden] 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_property_map.html
> 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
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