Boost logo

Boost Users :

Subject: Re: [Boost-users] BGL: interrupting breadth_first_search() at a certain distance/predicate?
From: David Abrahams (dave_at_[hidden])
Date: 2010-08-03 13:10:18


On Aug 3, 2010, at 12:51 PM, Anders Wallin wrote:

>> I was thinking to reset the filtered graph at every source vertex. Roughly
>> equivalent to keeping track of depth, without having to write the code.
>
> thanks for all replies, I will try writing an exception-throwing
> visitor or my own depth-limited bfs.

Really, that approach is likely to have very poor performance for your application. You can use the exception approach once for a very large search, but if you use it repeatedly on very short searches, you won't like the result. filtered_graph is your friend.

--
David Abrahams
BoostPro Computing
http://boostpro.com

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net