COIN-OR::LEMON - Graph Library

Ignore:
Timestamp:
05/03/04 12:04:27 (20 years ago)
Author:
marci
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@670
Message:

matching, flows

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/work/marci/bipartite_matching_try_2.cc

    r501 r510  
    7373  }
    7474
    75   std::cout << "Edges of the bipartite graph:" << std::endl;
    76   FOR_EACH_LOC(EdgeIt, e, g) std::cout << e << " ";
    77   std::cout << std::endl;
     75//   std::cout << "Edges of the bipartite graph:" << std::endl;
     76//   FOR_EACH_LOC(EdgeIt, e, g) std::cout << e << " ";
     77//   std::cout << std::endl;
    7878
    79   std::cout << "Nodes:" << std::endl;
    80   FOR_EACH_LOC(Graph::NodeIt, v, g) std::cout << v << " ";
    81   std::cout << std::endl;
    82   std::cout << "Nodes in T:" << std::endl;
    83   FOR_EACH_INC_LOC(Graph::ClassNodeIt, v, g, Graph::T_CLASS) std::cout << v << " ";
    84   std::cout << std::endl;
    85   std::cout << "Nodes in S:" << std::endl;
    86   FOR_EACH_INC_LOC(Graph::ClassNodeIt, v, g, Graph::S_CLASS) std::cout << v << " ";
    87   std::cout << std::endl;
     79//   std::cout << "Nodes:" << std::endl;
     80//   FOR_EACH_LOC(Graph::NodeIt, v, g) std::cout << v << " ";
     81//   std::cout << std::endl;
     82//   std::cout << "Nodes in T:" << std::endl;
     83//   FOR_EACH_INC_LOC(Graph::ClassNodeIt, v, g, Graph::T_CLASS) std::cout << v << " ";
     84//   std::cout << std::endl;
     85//   std::cout << "Nodes in S:" << std::endl;
     86//   FOR_EACH_INC_LOC(Graph::ClassNodeIt, v, g, Graph::S_CLASS) std::cout << v << " ";
     87//   std::cout << std::endl;
    8888
    89   std::cout << "Erasing the first node..." << std::endl;
    90   NodeIt n;
    91   g.first(n);
    92   g.erase(n);
    93   std::cout << "Nodes of the bipartite graph:" << std::endl;
    94   FOR_EACH_GLOB(n, g) std::cout << n << " ";
    95   std::cout << std::endl;
     89//   std::cout << "Erasing the first node..." << std::endl;
     90//   NodeIt n;
     91//   g.first(n);
     92//   g.erase(n);
     93//   std::cout << "Nodes of the bipartite graph:" << std::endl;
     94//   FOR_EACH_GLOB(n, g) std::cout << n << " ";
     95//   std::cout << std::endl;
    9696
    97   std::cout << "Nodes in T:" << std::endl;
    98   FOR_EACH_INC_LOC(Graph::ClassNodeIt, v, g, Graph::T_CLASS) std::cout << v << " ";
    99   std::cout << std::endl;
    100   std::cout << "Nodes in S:" << std::endl;
    101   FOR_EACH_INC_LOC(Graph::ClassNodeIt, v, g, Graph::S_CLASS) std::cout << v << " ";
    102   std::cout << std::endl;
     97//   std::cout << "Nodes in T:" << std::endl;
     98//   FOR_EACH_INC_LOC(Graph::ClassNodeIt, v, g, Graph::T_CLASS) std::cout << v << " ";
     99//   std::cout << std::endl;
     100//   std::cout << "Nodes in S:" << std::endl;
     101//   FOR_EACH_INC_LOC(Graph::ClassNodeIt, v, g, Graph::S_CLASS) std::cout << v << " ";
     102//   std::cout << std::endl;
    103103
    104104  typedef stGraphWrapper<Graph> stGW;
     
    120120  std::cout << "max flow value: " << max_flow_test.flowValue() << std::endl;
    121121  std::cout << "elapsed time: " << ts << std::endl;
    122   FOR_EACH_LOC(stGW::EdgeIt, e, stgw) {
    123     if (flow[e]) std::cout << e << std::endl;
    124   }
    125   std::cout << std::endl;
     122//   FOR_EACH_LOC(stGW::EdgeIt, e, stgw) {
     123//     if (flow[e]) std::cout << e << std::endl;
     124//   }
     125//   std::cout << std::endl;
    126126
    127127  return 0;
Note: See TracChangeset for help on using the changeset viewer.