Is there any way to easily instantiate a Color Map? I'd post my code, but I have 6 or 7 versions none of which work. Any help will be much appreciated. Thanks ahead!
Yes. First, I would recommend using the named parameter version of the call since it lets you omit optional parameters. If you really want to pass an exterior color map, you could do it this like this.
// Set up an external property, initialized to white
// by default.
vector<default_color_type> colors(num_vertices(g), white_color);
// Call the DFS algorithm
// I forget the actual syntax of the call, but it should be similar to this.
depth_first_search(g,
visitor(vis)
.start_vertex(v)
.color_map(colors(&colors[0]));
Hope that helps,