COIN-OR::LEMON - Graph Library

Changeset 12:0810e3fc64a4 in lemon-0.x


Ignore:
Timestamp:
01/12/04 12:49:16 (16 years ago)
Author:
marci
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@25
Message:

.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/work/marci_graph_demo.cc

    r9 r12  
    3030
    3131  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;
    32   std::cout << "number of nodes: " << number_of<each_node_iterator>(G.first_node()) << std::endl;
     32  std::cout << "number of nodes: " << number_of(G.first_node()) << std::endl;
    3333
    3434  for(each_node_iterator i=G.first_node(); i.is_valid(); ++i) {
     
    3939    }
    4040    std::cout << std::endl;
     41
     42    std::cout<< " ";
     43    for(out_edge_iterator j=G.first_out_edge(i); j.is_valid(); ++j) {
     44      std::cout << G.a_node(j) << "->" << G.b_node(j) << " "; }
     45    std::cout<<std::endl;
     46
    4147    std::cout << " indegree: (in_edge_oterator) " << number_of(G.first_in_edge(i)) << " ";
    4248    for(in_edge_iterator j=G.first_in_edge(i); j.is_valid(); ++j) {
    4349      std::cout << j << " "; }
    4450    std::cout << std::endl;
     51
     52    std::cout<< " ";
     53    for(in_edge_iterator j=G.first_in_edge(i); j.is_valid(); ++j) {
     54      std::cout << G.a_node(j) << "->" << G.b_node(j) << " "; }
     55    std::cout<<std::endl;
     56
    4557    std::cout << " degree: (sym_edge_iterator) " << number_of(G.first_sym_edge(i)) << " ";
    4658    for(sym_edge_iterator j=G.first_sym_edge(i); j.is_valid(); ++j) {
    4759      std::cout << j << " "; }
     60    std::cout<<std::endl;
     61
     62    std::cout<< " ";
     63    for(sym_edge_iterator j=G.first_sym_edge(i); j.is_valid(); ++j) {
     64      std::cout << G.a_node(j) << "->" << G.b_node(j) << " "; }
    4865    std::cout<<std::endl;
    4966  }
Note: See TracChangeset for help on using the changeset viewer.