# HG changeset patch # User marci # Date 1073908156 0 # Node ID 0810e3fc64a496e85a1fe1be9c2f029c12b5d193 # Parent 33a84426c22168dc9cf44801ed595c86897dc710 . diff -r 33a84426c221 -r 0810e3fc64a4 src/work/marci_graph_demo.cc --- a/src/work/marci_graph_demo.cc Mon Jan 12 11:48:49 2004 +0000 +++ b/src/work/marci_graph_demo.cc Mon Jan 12 11:49:16 2004 +0000 @@ -29,7 +29,7 @@ } std::cout << "We construct a directed graph on the node set {0,1,2,...,7}," <j is arc iff i(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<" << G.b_node(j) << " "; } + std::cout<" << G.b_node(j) << " "; } + std::cout<