
Boost Users : 
Subject: Re: [Boostusers] BGL: interrupting breadth_first_search() at a certain distance/predicate?
From: Line Blander Reinhardt (lbre_at_[hidden])
Date: 20100803 08:17:44
Eventhough I love filtered graphs I do not see how it would work in your situation assuming that you don't always use the same source vertex (If you do use the same source vertex it will be a good option).
I would probably make my own breath first search on the boost graph that kept track of the depth and stopped after depth 56.
Best
Line
________________________________________
Fra: boostusersbounces_at_[hidden] [boostusersbounces_at_[hidden]] På vegne af Anders Wallin [anders.e.e.wallin_at_[hidden]]
Sendt: 2. august 2010 16:46
Til: boostusers
Emne: [Boostusers] BGL: interrupting breadth_first_search() at a certain distance/predicate?
Hi all,
I have a graph where I start at a certain vertex and want to find the
next undiscovered vertex at a maximum distance of 5 or so from the
source vertex.
Now I am running breadth_first_search() using a record_distances()
visitor and I get the distances to all other vertices (say 10 000 of
them) in my graph. This makes my algorithm slow, since I only need to
know about vertices at a max distance of 56, not all of them.
Is there a way of interrupting the algorithm when a certain predicate
function supplied by me evaluates to true? (e.g. max distance reached,
or a new interesting/valid vertex found, etc)
thanks,
AW
_______________________________________________
Boostusers mailing list
Boostusers_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boostusers
Boostusers 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