I want to use the boosts method breadth_first_visit, and I would like to provide it with my own “external” color map. I defined the schedule as follows:
typedef boost::adjacency_list<boost::setS, boost::listS, boost::undirectedS,
boost::property<boost::vertex_index_t, int,
boost::property<boost::vertex_color_t, boost::default_color_type,
Node_t>>> GraphType;
where Node_tis the structure that defines the properties for the vertices. However, I cannot find out how I can provide BFS with my own color map. I would like to keep the colors of the vertices in the vector, so my definition looks like
std::vector<boost::default_color_type> colors;
but i cant figure out how to use this for bfs.
Neither
boost::breadth_first_search(g, *boost::vertices(g).first,
boost::color_map(colors));
and
boost::breadth_first_search(g, *boost::vertices(g).first,
boost::color_map(&colors[0]));
. (, default-int , "boost:: color_traits" ), C2664: "boost:: put" 2 'void *' 'ptrdiff_t'.
, : . : vertex_descriptor?