Boost logo

Boost :

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
>> 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

Boost list run by bdawes at, gregod at, cpdaniel at, john at