
2007/1/4, Ferng, Andrew D <andrew.d.ferng@boeing.com>:
template <typename VertexIterator> subgraph<Graph>& create_subgraph(VertexIterator first, VertexIterator last) [snip] After further digging.....I think subgraph is what I wanted. So I changed everything to a subgraph and ran connected_components on it. From the result, I've isolated the vertices in the original graph that I am interested in.
I'm thinking the next step is to create a new container and place the desired vertices in it so that I can supply the first and last iterator. Is there a special type of container? Or just a standard vector will work?
Yes, a vector will work. Another idea is to use a filter-iterator on the old vertex-list, where the predicate uses the property map you received from connected_components algorithm. HTH, Stephan