Dijkstra Visitor - Accessing the priority queue
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. Can I access the priority queue inside a visitor using something like an extern declaration, since none of the Dijkstra Visitor's methods gets the priority queue as an argument ? With regards, Jonas Gabriel
On 6/22/07, Jonas Gabriel
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
participants (2)
-
Jonas Gabriel
-
moritz Hilger