
14 Jul
2006
14 Jul
'06
2:54 p.m.
Hello, I have a graph type as follows: namespace boost { enum vertex_flag_t { vertex_flag = 111 }; BOOST_INSTALL_PROPERTY(vertex, flag); } typedef boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS, property<vertex_name_t, std::string, property<vertex_flag_t, bool, property<vertex_color_t, default_color_type> > >, no_property> graph_t; graph_t g; That means I want to associate a string as name, a flag, and a default color to each vertex of my graph, now I want to add edges to my graph directly using the vertex' properties instead of their descriptors, e.g. boost::add_edge("vertex1", "vertex2", g); How can I accomplish this? Thanks. Max