I need to supply it with an appropriate visitor which does the exploring
of adjacent nodes and a property map for the colouring.
Setting up those two causes me trouble. I simply fail at making sense of the documentation.

Creating a visitor is easy. Creating exterior property maps can be a bit of a pain.

struct my_visitor : default_bfs_visitor
{
  my_color_map colors;

  template <typename Graph, typename Vertex>
  discover_vertex(Graph& g, Vertex v)
  { /* Your code here */ }
};

// calling it
queue<graph_traits<Graph>::vertex_descriptor> q;
breadth_first_visit(g, root, q, my_visitor(), my_colors);
 
Andrew Sutton
andrew.n.sutton@gmail.com