Boost logo

Boost Users :

From: adel essafi (adel.essafi_at_[hidden])
Date: 2003-11-11 09:00:11


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


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