Boost logo

Boost Users :

From: Jeremy Siek (jsiek_at_[hidden])
Date: 2002-01-15 14:17:58


There is not a way to stop that is built into depth_first_search, but you
can throw and exception from within the visitor, and then catch the
exception outside of the call to depth_first_search.

On Tue, 15 Jan 2002, tobi_schuele wrote:
tobias> Hi,
tobias>
tobias> I'd like to use depth_first_search to check whether a particular
tobias> vertex is reachable from the root vertex. Is there a way to stop the
tobias> search when the vertex is found? In other words, can a visitor be used
tobias> to cut the search tree? Sorry, if this is a newbie question. Thank you
tobias> very much in advance for your help.
tobias>
tobias> Tobias

----------------------------------------------------------------------
 Jeremy Siek http://php.indiana.edu/~jsiek/
 Ph.D. Student, Indiana Univ. B'ton email: jsiek_at_[hidden]
 C++ Booster (http://www.boost.org) office phone: (812) 855-3608
----------------------------------------------------------------------


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