
Boost : 
From: Vladimir Prus (ghost_at_[hidden])
Date: 20020125 07:10:24
Hi,
suppose I have a directed graph where vertices are labelled with a
string. Given a vertex, if would like to gather the set of vertices such that
1. They have nonempty label
2. There's a path from start vertex to each of them, which does not pass
through any vertex with nonempty label.
'depth_first_visit' can do almost all I want, but can't enforce (2)  I need
to be able to stop recursion once a vertex with nonempty label is found.
Would it be reasonable to change the type of DFSVisitor::discover_vertex to
bool, so that outedges are not examined at all when it returns false. If the
change will cause too much inconvenience for the already written code, maybe
method like 'processing_needed' can be added?
BTW, I'm confused by docs to DFSVisitor::finish_vertex:
This invoked on a vertex after all of its out edges have been added to
the search tree and all of the adjacent vertices have been discovered
(but before their outedges have been examined).
I don't understand the statement about outedges of the adjacent vertices. In
fact, depth_first_visit_impl is called and all adjacent vertices and it will
traverse outedges. Am I wrong?
 Volodya
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk