
12 May
2010
12 May
'10
6:39 p.m.
I noticed the Boost doc for dijkstra_shortest_paths() http://www.boost.org/doc/libs/1_43_0/boost/graph/dijkstra_shortest_paths.hpp says that the algorithm terminates when the priority queue is empty, which implies visiting every vertex, which is not necessary to find the shortest path between two vertices. I would like to use the algorithm to find the shortest path to a known vertex, which means stopping it before the queue is empty. At what point can I (the library client) decide to end a BFS search? Eric