Boost logo

Boost Users :

Subject: Re: [Boost-users] [BGL] depth first search : forcing backtrack
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2011-03-03 20:42:46


On Thu, 3 Mar 2011, andreas tanner wrote:

> I understand that for early exit from a depth_first_search, I use exceptions
> thrown in a visitor. Now how can I force not a complete exit, but just an
> immediate backtrack towards the root node?

Do you mean that you don't want the children of a given node explored,
based on the result of the visitor? If so, you can use
depth_first_visit(), which has a parameter for a termination function to
do exactly that.

-- Jeremiah Willcock


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