|
Boost : |
From: Wang Weiwei (wwwang_at_[hidden])
Date: 2006-07-14 10:54:24
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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk