Re: [Boost-users] problem with boost::strong_components
Hi, Tamas Why you don't try this, seems should work: graph_t cityg (bigedges.begin (), bigedges.end (), bigweights.begin (), dim); int num = strong_components(cityg, &component[0]); you use std::vector as vertex storage, right? Regards, Dmitry
Hello, I'm trying to use the boost library's strong_components function to partition a graph to connected sub-partitions, and ran into a problem.
std::vector<int> other; // fill up the vector with the vertices by pushing back each one. The number of vertices is about 170k and the biggest vertex index is about 260k. // .. // bigedges and bigweights have the edges and the weights, dim is the total number of vertices - all these are checked and proper.
graph_t cityg (bigedges.begin (), bigedges.end (), bigweights.begin (), dim); std::vector<int> component(num_vertices(cityg)); int num = strong_components(cityg, &component[0], boost::vertex_index_map (&other[0]));
Tamas
participants (1)
-
Dmitry