src/work/marci/bipartite_matching_try_2.cc
changeset 510 72143568cadc
parent 501 20e4941a354a
child 555 995bc1f1a3ce
     1.1 --- a/src/work/marci/bipartite_matching_try_2.cc	Mon May 03 09:44:00 2004 +0000
     1.2 +++ b/src/work/marci/bipartite_matching_try_2.cc	Mon May 03 10:04:27 2004 +0000
     1.3 @@ -72,34 +72,34 @@
     1.4      g.addEdge(s_nodes[random(a)], t_nodes[random(b)]);
     1.5    }
     1.6  
     1.7 -  std::cout << "Edges of the bipartite graph:" << std::endl;
     1.8 -  FOR_EACH_LOC(EdgeIt, e, g) std::cout << e << " ";
     1.9 -  std::cout << std::endl;
    1.10 +//   std::cout << "Edges of the bipartite graph:" << std::endl;
    1.11 +//   FOR_EACH_LOC(EdgeIt, e, g) std::cout << e << " ";
    1.12 +//   std::cout << std::endl;
    1.13  
    1.14 -  std::cout << "Nodes:" << std::endl;
    1.15 -  FOR_EACH_LOC(Graph::NodeIt, v, g) std::cout << v << " ";
    1.16 -  std::cout << std::endl;
    1.17 -  std::cout << "Nodes in T:" << std::endl;
    1.18 -  FOR_EACH_INC_LOC(Graph::ClassNodeIt, v, g, Graph::T_CLASS) std::cout << v << " ";
    1.19 -  std::cout << std::endl;
    1.20 -  std::cout << "Nodes in S:" << std::endl;
    1.21 -  FOR_EACH_INC_LOC(Graph::ClassNodeIt, v, g, Graph::S_CLASS) std::cout << v << " ";
    1.22 -  std::cout << std::endl;
    1.23 +//   std::cout << "Nodes:" << std::endl;
    1.24 +//   FOR_EACH_LOC(Graph::NodeIt, v, g) std::cout << v << " ";
    1.25 +//   std::cout << std::endl;
    1.26 +//   std::cout << "Nodes in T:" << std::endl;
    1.27 +//   FOR_EACH_INC_LOC(Graph::ClassNodeIt, v, g, Graph::T_CLASS) std::cout << v << " ";
    1.28 +//   std::cout << std::endl;
    1.29 +//   std::cout << "Nodes in S:" << std::endl;
    1.30 +//   FOR_EACH_INC_LOC(Graph::ClassNodeIt, v, g, Graph::S_CLASS) std::cout << v << " ";
    1.31 +//   std::cout << std::endl;
    1.32  
    1.33 -  std::cout << "Erasing the first node..." << std::endl;
    1.34 -  NodeIt n;
    1.35 -  g.first(n);
    1.36 -  g.erase(n);
    1.37 -  std::cout << "Nodes of the bipartite graph:" << std::endl;
    1.38 -  FOR_EACH_GLOB(n, g) std::cout << n << " ";
    1.39 -  std::cout << std::endl;
    1.40 +//   std::cout << "Erasing the first node..." << std::endl;
    1.41 +//   NodeIt n;
    1.42 +//   g.first(n);
    1.43 +//   g.erase(n);
    1.44 +//   std::cout << "Nodes of the bipartite graph:" << std::endl;
    1.45 +//   FOR_EACH_GLOB(n, g) std::cout << n << " ";
    1.46 +//   std::cout << std::endl;
    1.47  
    1.48 -  std::cout << "Nodes in T:" << std::endl;
    1.49 -  FOR_EACH_INC_LOC(Graph::ClassNodeIt, v, g, Graph::T_CLASS) std::cout << v << " ";
    1.50 -  std::cout << std::endl;
    1.51 -  std::cout << "Nodes in S:" << std::endl;
    1.52 -  FOR_EACH_INC_LOC(Graph::ClassNodeIt, v, g, Graph::S_CLASS) std::cout << v << " ";
    1.53 -  std::cout << std::endl;
    1.54 +//   std::cout << "Nodes in T:" << std::endl;
    1.55 +//   FOR_EACH_INC_LOC(Graph::ClassNodeIt, v, g, Graph::T_CLASS) std::cout << v << " ";
    1.56 +//   std::cout << std::endl;
    1.57 +//   std::cout << "Nodes in S:" << std::endl;
    1.58 +//   FOR_EACH_INC_LOC(Graph::ClassNodeIt, v, g, Graph::S_CLASS) std::cout << v << " ";
    1.59 +//   std::cout << std::endl;
    1.60  
    1.61    typedef stGraphWrapper<Graph> stGW;
    1.62    stGW stgw(g);
    1.63 @@ -119,10 +119,10 @@
    1.64  //  }
    1.65    std::cout << "max flow value: " << max_flow_test.flowValue() << std::endl;
    1.66    std::cout << "elapsed time: " << ts << std::endl;
    1.67 -  FOR_EACH_LOC(stGW::EdgeIt, e, stgw) { 
    1.68 -    if (flow[e]) std::cout << e << std::endl; 
    1.69 -  }
    1.70 -  std::cout << std::endl;
    1.71 +//   FOR_EACH_LOC(stGW::EdgeIt, e, stgw) { 
    1.72 +//     if (flow[e]) std::cout << e << std::endl; 
    1.73 +//   }
    1.74 +//   std::cout << std::endl;
    1.75  
    1.76    return 0;
    1.77  }