Boost logo

Boost Users :

Subject: Re: [Boost-users] [BGL] depth first search : forcing backtrack
From: andreas.tanner_at_[hidden]
Date: 2011-03-07 06:35:03


Thanks for that hint. Is there somewhere an example on how to use that
with adjacency_list ? One has to provide a colormap with
depth_first_visit - is there one available?

This is what I'm trying to do:

depth_first_visit(g,_x,dfs_visitor(), ???,
                  
boost::bind(&POAlgorithm::tryTransitiveInsertVisitor::terminate, this,
_1, _2));

--Andreas Tanner.

Zitat von Jeremiah Willcock <jewillco_at_[hidden]>:

> 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 mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>


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