Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2001-01-02 23:28:56

----- Original Message -----
From: "Jeremy Siek" <jsiek_at_[hidden]>

> This is currently no straightforward way to stop early with the BGL
> dijkstra algorithm. As Dietmar mentioned, this would be easier with an
> algorithm iterator approach, but we don't have that yet (so little time,
> so much stuff to do).

I have real concerns about the efficiency of the algorithm iterator
approach, unless you have some way to add a kind of "smart loop unrolling".

> Also, we could change the BFS family of algorithms
> to explicitly allow for an early stop. I'll try to look into this...
> perhaps you could also take a look into what changes would need to be
> made.
> The exception throwing would probably work, though I'd only want
> that to be a temporary solution...

If the graph is big, exiting the algorithm by throwing an exception might be
the most efficient way ;-). Of course, if you do many invocations on small
graphs, it may be the least efficient ;-(.


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