
3 Nov
2010
3 Nov
'10
9:19 a.m.
Hi, I managed to record a shortest path between two vertices by doing adjacency_list < vecS, vecS, undirectedS > g; std::vector<Vertex> p(boost::num_vertices(g)); Vertex vertex = *(boost::vertices(g).first); boost::breadth_first_search(g, vertex, boost::visitor( boost::make_bfs_visitor( boost::record_predecessors(&p[0], boost::on_tree_edge()) ) ) ); The shortest path can be found by inspecting the vector p. But my goal is slightly different. Does anyone know how to "record" all shortest paths between two vertices? (i.e. all paths having the minimal path length) cheers, Erik Sjölund