Boost logo

Boost Users :

Subject: [Boost-users] Termination of breadth first search
From: Eric Fowler (eric.fowler_at_[hidden])
Date: 2010-05-12 14:39:58


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



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