11 Nov
2003
11 Nov
'03
2 p.m.
I have a proble with bfs example of graph library. first I write this code typedef adjacency_list < vecS, vecS, bidirectionalS > graph_t; // Set up the vertex IDs and names enum { r, s, t, u, v , N}; const char *name = "rstuv"; // Specify the edges in the graph typedef std::pair < int, int >E; E edge_array[] = { E(0, 2), E(0,3) , E(3, 1), E(2, 3), E(3, 4)}; // Create the graph object and the result (order of visit ) was 0 -> 2-> 3 ->1 ->4 which true. Second I only modified the rank of an edge E edge_array[] = { E(0,3) ,E(0, 2), E(3, 1), E(2, 3), E(3, 4)}; and I got a wrong order 0->3 ->2->1->4 Normally , the edge rank don't have any influence on the result?????????????????????? Cheers