[Lemon-commits] [lemon_svn] marci: r25 - hugo/trunk/src/work

Lemon SVN svn at lemon.cs.elte.hu
Mon Nov 6 20:36:54 CET 2006


Author: marci
Date: Mon Jan 12 12:49:16 2004
New Revision: 25

Modified:
   hugo/trunk/src/work/marci_graph_demo.cc

Log:
.


Modified: hugo/trunk/src/work/marci_graph_demo.cc
==============================================================================
--- hugo/trunk/src/work/marci_graph_demo.cc	(original)
+++ hugo/trunk/src/work/marci_graph_demo.cc	Mon Jan 12 12:49:16 2004
@@ -29,7 +29,7 @@
     }  
 
   std::cout << "We construct a directed graph on the node set {0,1,2,...,7}," <<std::endl << "i-->j is arc iff i<j and (i+j)%3." << std::endl;
-  std::cout << "number of nodes: " << number_of<each_node_iterator>(G.first_node()) << std::endl;
+  std::cout << "number of nodes: " << number_of(G.first_node()) << std::endl;
 
   for(each_node_iterator i=G.first_node(); i.is_valid(); ++i) {
     std::cout << "node " << G.id(i) << std::endl;
@@ -38,14 +38,31 @@
       std::cout << "(" << G.id(G.tail(j)) << "--" << G.id(j) << "->" << G.id(G.head(j)) << ") ";
     }
     std::cout << std::endl; 
+
+    std::cout<< " ";
+    for(out_edge_iterator j=G.first_out_edge(i); j.is_valid(); ++j) { 
+      std::cout << G.a_node(j) << "->" << G.b_node(j) << " "; } 
+    std::cout<<std::endl;
+
     std::cout << " indegree: (in_edge_oterator) " << number_of(G.first_in_edge(i)) << " ";
     for(in_edge_iterator j=G.first_in_edge(i); j.is_valid(); ++j) { 
       std::cout << j << " "; } 
     std::cout << std::endl;
+
+    std::cout<< " ";
+    for(in_edge_iterator j=G.first_in_edge(i); j.is_valid(); ++j) { 
+      std::cout << G.a_node(j) << "->" << G.b_node(j) << " "; } 
+    std::cout<<std::endl;
+
     std::cout << " degree: (sym_edge_iterator) " << number_of(G.first_sym_edge(i)) << " ";
     for(sym_edge_iterator j=G.first_sym_edge(i); j.is_valid(); ++j) { 
       std::cout << j << " "; } 
     std::cout<<std::endl;
+
+    std::cout<< " ";
+    for(sym_edge_iterator j=G.first_sym_edge(i); j.is_valid(); ++j) { 
+      std::cout << G.a_node(j) << "->" << G.b_node(j) << " "; } 
+    std::cout<<std::endl;
   }
 
   std::cout << "all edges: ";



More information about the Lemon-commits mailing list