Boost logo

Boost Users :

From: kweeheong (tan.k.h_at_[hidden])
Date: 2002-10-31 18:45:49


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?


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