Print boost graph with custom vertex label

4 Dec
2013
4 Dec
'13
4:54 a.m.
Hi All, I want to print a Boost Graph having custom(string) vertex labels instead of the default vertex numbering label 0,1,2... I have initialized the graph as : typedef adjacency_list <vecS, vecS, directedS, property<vertex_name_t,string>> Graph; Graph g; set<string> names; map<string,Graph::vertex_descriptor> vertex ; for(auto it = names.begin() ; it != names.end(); ++it ) vertex[*it] = add_vertex(*it,g) ; Now how should I print this graph such that I get edges of the form abc -> xyz; instead of 1->2; Thanks and Regards, Shambwaditya
4203
Age (days ago)
4203
Last active (days ago)
0 comments
1 participants
participants (1)
-
Saha, Shambwaditya