20 May
2009
20 May
'09
4:47 p.m.
Hi, Dear All, In the graph of nodes (e.g. 1 , 2, 3, 4, 5, 6 , 7........). I want to iterate to the adjacent nodes of node x. For this i am using adjacent_vertices(v, g), which returns std::pair<adjacency_iterator, adjacency_iterator> for (i = 1; i <= n; i++){ tie(eo, eo_end) = adjacent_vertices( vertex( i-1, graph), graph); } Please guide me how i can use the adjacency_iterator to access the neighbourhood of node x ? e.g. graph is a 1 ---- 2 3 4 5 2 ---- 4 5 6 3 ---- 5 6 7 so, neighbourhood of 1 are 2 3 4 5 2 are 4 5 6 3 are 5 6 7 I will be thankful to you. Regards Amanullah YASIN Master2 (ECD) Ecole Polytechnique Université de Nantes, France. Mob# 06 47 62 89 96 Fix # 02 72 00 26 45 amanyasin@gmail.com