src/test/undir_graph_test.cc
changeset 1369 f1cf6b807414
parent 1307 d4acebef7276
equal deleted inserted replaced
6:f894dd88c29a 7:eb5483afd796
    54 
    54 
    55   typedef typename Graph::NodeIt NodeIt;
    55   typedef typename Graph::NodeIt NodeIt;
    56   typedef typename Graph::UndirEdgeIt UEdgeIt;
    56   typedef typename Graph::UndirEdgeIt UEdgeIt;
    57   typedef typename Graph::EdgeIt EdgeIt;
    57   typedef typename Graph::EdgeIt EdgeIt;
    58 
    58 
    59   cout << "Nodes" << endl;
    59   std::cout << "Nodes" << std::endl;
    60   int i=0;
    60   int i=0;
    61   for(NodeIt it(g); it!=INVALID; ++it, ++i) {
    61   for(NodeIt it(g); it!=INVALID; ++it, ++i) {
    62     cout << "  " << i << ": " << g.id(it) << endl;
    62     std::cout << "  " << i << ": " << g.id(it) << std::endl;
    63   }
    63   }
    64 
    64 
    65   cout << "UndirEdge" << endl;
    65   std::cout << "UndirEdge" << std::endl;
    66   i=0;
    66   i=0;
    67   for(UEdgeIt it(g); it!=INVALID; ++it, ++i) {
    67   for(UEdgeIt it(g); it!=INVALID; ++it, ++i) {
    68     cout << "  " << i << ": " << g.id(it) 
    68     std::cout << "  " << i << ": " << g.id(it) 
    69 	 << " (" << g.id(g.source(it)) << ", " << g.id(g.target(it)) 
    69 	 << " (" << g.id(g.source(it)) << ", " << g.id(g.target(it)) 
    70 	 << ")" << endl;
    70 	 << ")" << std::endl;
    71   }
    71   }
    72 
    72 
    73   cout << "Edge" << endl;
    73   std::cout << "Edge" << std::endl;
    74   i=0;
    74   i=0;
    75   for(EdgeIt it(g); it!=INVALID; ++it, ++i) {
    75   for(EdgeIt it(g); it!=INVALID; ++it, ++i) {
    76     cout << "  " << i << ": " << g.id(it)
    76     std::cout << "  " << i << ": " << g.id(it)
    77 	 << " (" << g.id(g.source(it)) << ", " << g.id(g.target(it)) 
    77 	 << " (" << g.id(g.source(it)) << ", " << g.id(g.target(it)) 
    78 	 << ")" << endl;
    78 	 << ")" << std::endl;
    79   }
    79   }
    80 
    80 
    81 }
    81 }
    82 
    82 
    83 template <typename Graph>
    83 template <typename Graph>