16 Nov
2005
16 Nov
'05
11:41 p.m.
On 11/16/05, Stephane Grabli
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