Boost logo

Boost Users :

From: Ning Ruan (nruan_at_[hidden])
Date: 2007-10-07 23:42:26


my code to use transitive_closure():
        Graph tc;
        VertexIndexMap index_map = get(&VertexProp::id, g);
        vector<Vertex> to_tc_vec(num_vertices(g));
        iterator_property_map<Vertex*, VertexIndexMap, Vertex, Vertex&>
                g_to_tc_map(&to_tc_vec[0], index_map);
        transitive_closure(graph, tc, g_to_tc_map, (index_map));

I use print_graph(tc, get(&VertexProp::id, tc) to print the transitive
graph, then it shows:
0 --> 0 0 0 0 0 0 0 0
0 --> 0 0
0 -->
0 --> 0 0 0 0 0 0 0 0
0 -->
0 -->
0 --> 0 0 0
0 --> 0 0 0 0 0 0 0 0

the result miss the id of vertex, what 's the problem. my original graph
g is correcet:

0 --> 1 2 3
1 --> 4 5
2 -->
3 --> 6 7
4 -->
5 -->
6 --> 1
7 --> 0


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net