
I have yet to be able to use edge descriptors as keys to external property maps. Try using internal property maps.
Cromwell D. Enage
Thanks for your help. Would you pls give me an example showing the usage of internal property map for the vertices and edges?
or, to make the question simpler, how to declare a adjacency_list type graph object with internal vertex/edge property maps as follows: vertex descriptor -> MyVpmType edge descriptor -> MyEpmType And how to access the internal maps to do sum get/put operation?
Thanks again.
max

--- Wang Weiwei wrote:
Thanks for your help. Would you pls give me an example showing the usage of internal property map for the vertices and edges?
or, to make the question simpler, how to declare an adjacency_list type graph object with internal vertex/edge property maps as follows:
vertex descriptor -> MyVpmType edge descriptor -> MyEpmType
struct elem_id_t { typedef boost::vertex_property_tag kind; }; struct edge_id_t { typedef boost::edge_property_tag kind; }; typedef boost::property<elem_id_t, char> MyVpmType; typedef boost::property<edge_id_t, std::string> MyEpmType; typedef boost::adjacency_list< boost::listS , boost::vecS , boost::directedS , MyVpmType , MyEpmType > Graph; Graph g;
And how to access the internal maps to do sum get/put operation?
boost::property_map<Graph, elem_id_t>::type vertex_map = boost::get(elem_id_t(), g); boost::property_map<Graph, edge_id_t>::type edge_map = boost::get(edge_id_t(), g); Cromwell D. Enage __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
participants (2)
-
Cromwell Enage
-
Wang Weiwei