From: Yu Huang (yuhuang_at_[hidden])
Date: 2005-09-05 15:30:10
I tried a clustering recursively cut the graph based on
betweenness_centrality and form the connected components into subgraphs
of the original big graph.
It's convenient to use subgraph("graph.create_subgraph()"), but the
trick is that whenever "remove_edge(e, subgraph)", the subgraph and its
ancestor graph is not affected(not like what the doc says).
Code sketch is like this:
indirect_cmp<EdgeCentralityMap, std::less<centrality_type> >
edgeDescriptor e = *max_element(edges(subgraph).first,
centrality_type max_centrality = get(ec_map, e);
std::cerr<<"max_centrality is "<<max_centrality<<std::endl;
std::cerr<<"after removal the subgraph has
The last error-reporting sentence lets me find that the edge e is not
removed from subgraph at all.
Even I tried to remove e from
graph("remove_edge(subgraph.local_to_global(e), graph)"), it also fails.
I hope somebody could have a check on it.
So i gave up the subgraph and directly create graphs(real graph) from
the components of the ancestor graph. It worked out.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk