|
Boost Users : |
From: Aaron Windsor (aaron.windsor_at_[hidden])
Date: 2005-11-16 18:41:18
On 11/16/05, Stephane Grabli <Stephane.Grabli_at_[hidden]> wrote:
> Thanks Aaron, it seems to work.
> Could you please confirm that the key to use
> to access the vector_property_map is of type
> Graph::vertex_descriptor (and not of the type
> graph_traits<Graph>::vertices_size_type) ?
> In other words, to access this property map, the code should look like:
>
> for(tie(vi,vend) = vertices(g); vi != vend; ++vi){
> v_size_t ind = get(index, *vi);
> cout << "Vertex " << ind<<" is in component " <<
> get(componentMap,*vi) << endl;
> }
>
> and not with "get(componentMap, ind)".
> Thanks again!
>
> Stephane
>
Yes, that sounds right. The ComponentMap should map vertex_descriptors
to things of type vertices_size_type, so the key would be a
vertex_descriptor.
Aaron
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