Subject: Re: [boost] [BGL] How to stopping prematurely a graph exploration
From: K. Noel Belcourt (kbelco_at_[hidden])
Date: 2009-08-06 15:48:14
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
>> vertex, I empty the queue, and the algorithm terminates.
> This question came up about a year ago, and the exception trick was
> the best general solution at the time, but this solution sounds a
> 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.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk