src/work/alpar/list_graph_demo.cc
changeset 1161 1c9658d51c8d
parent 959 c80ef5912903
equal deleted inserted replaced
5:34824f48d26a 6:538c8576dcd4
   109   
   109   
   110     Graph::EdgeMap<int> em(G);
   110     Graph::EdgeMap<int> em(G);
   111     Graph::SymEdgeMap<int> sm(G);
   111     Graph::SymEdgeMap<int> sm(G);
   112     for(EdgeIt e(G);G.valid(e);G.next(e)) em[e]=G.id(e);
   112     for(EdgeIt e(G);G.valid(e);G.next(e)) em[e]=G.id(e);
   113     for(EdgeIt e(G);G.valid(e);G.next(e))
   113     for(EdgeIt e(G);G.valid(e);G.next(e))
   114       if(G.tail(e)<G.head(e)) sm[e]=G.id(e);
   114       if(G.source(e)<G.target(e)) sm[e]=G.id(e);
   115     
   115     
   116     for(EdgeIt e(G);G.valid(e);G.next(e))
   116     for(EdgeIt e(G);G.valid(e);G.next(e))
   117       std::cout << G.id(G.tail(e)) << "->" << G.id(G.head(e))
   117       std::cout << G.id(G.source(e)) << "->" << G.id(G.target(e))
   118 		<< ": id=" << G.id(e) << " oppid=" << G.id(G.opposite(e))
   118 		<< ": id=" << G.id(e) << " oppid=" << G.id(G.opposite(e))
   119 		<< " em=" << em[e]
   119 		<< " em=" << em[e]
   120 		<< " sm=" << sm[e] << "\n";
   120 		<< " sm=" << sm[e] << "\n";
   121     
   121     
   122     //Delete all nodes
   122     //Delete all nodes