X-No-Archive: yes
Hi all,
I'm interested in adding edges to a graph whose vertices are labelled, and I would like to do this using the vertex NAMES instead of their indices (or "descriptors"). I know that add_edge uses vertex_descriptor, so I probably won't be able to achieve what I want directly, but I thought property maps would allow to easily recover the vertex_descriptor corresponding to a given label. Unfortunately, although I have spent a lot of time looking for that in the documentation, I didn't succeed in achieving my goal.
My graph is declared as follows:
typedef adjacency_list< vecS, vecS, undirectedS, property< vertex_name_t, std::string > > Graph;
Graph G(0);
I hoped that
boost::property_map
participants (1)
-
Anthony Labarre