view LICENSE @ 190:36968a63efe1

Got the connected_components to finally work using a vecS for the vertex list in the adjacency list. In this case, the component map is simply a vector of ints (which is the type of UndirectedGraph::vextex_descriptor (=graph_traits<FeatureGraph>::vertex_descriptor) and probably UndirectedGraph::vertices_size_type). To use listS, I was told on the Boost mailing list: >> 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). It may be feasible with a component map like shared_array_property_map< graph_traits<FeatureGraph>::vertex_descriptor, property_map<FeatureGraph, vertex_index_t>::const_type > components(num_vertices(g), get(vertex_index, g));
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Wed, 07 Dec 2011 18:51:32 -0500
parents 9a51372607d6
children
line wrap: on
line source

Copyright (c) 2009-2011 Nicolas Saunier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.