Boost logo

Boost Users :

From: moritz Hilger (moritz.hilger_at_[hidden])
Date: 2007-06-23 05:06:42


On 6/22/07, Jonas Gabriel <gkamprie_at_[hidden]> wrote:
>
> Good morning,
>
> I'm trying to make a single pair shortest path function using the
> goal-directed search technique based on dijkstra_shortest_paths and
> Visitors.
>
> In some point when the target vertex is processed, I would like to exit
> dijkstra_shortest_paths.To do that I 'm thinking trying to empty the
> priority queue.
>

Hi, the "recommended" way to achieve this is to throw an exception from a
visitor hooked at examine_vertex and catch it outside the dijkstra call.
hth, moritz

Moritz Hilger
Combinatorial Optimization & Graph Algorithms
TU Berlin
+49 30 314-25773



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