31 Oct
2002
31 Oct
'02
11:45 p.m.
I have a custom BFS visitor used to traverse a graph. Is there a built-in way to - prune off a vertex's descendants from the search - exit a BFS These ( pruning and terminating ) are separate situations. I believe the following will work; however, I do not know how to access the relevant data structures. - To prune off a vertex's descendents from the search In the custom BFS visitor's discover_vertex event, set the color of all its adjacent descendants to "black". - To exit a BFS In the custom BFS visitor's discover_vertex event, once the required vertex is found, empty the queue of vertices. How can I access a vertex's color and a BFS's queue? Or is there a better way?