
6 Aug
2009
6 Aug
'09
7:48 p.m.
On Aug 6, 2009, at 5:30 AM, Andrew Sutton wrote:
I've thought to create a visitor with a queue parameter and a vertex parameter, in which I pass the Dijkstra's queue and the particular vertexDescriptor. When the examine_vertex() function analyzes the particular vertex, I empty the queue, and the algorithm terminates.
This question came up about a year ago, and the exception trick was deemed the best general solution at the time, but this solution sounds a little more graceful. Let us know if it works :)
I combined queue emptying with marking all the vertices black to ensure that nothing else gets pushed into the queue. This has worked fine for us. -- Noel