src/work/marci/edmonds_karp_demo.cc
changeset 263 f24f276e0b6b
parent 206 47f62d789fe7
child 266 4cec4981dfd1
equal deleted inserted replaced
12:c16985af272c 13:3c3bdce8e9ad
    32 
    32 
    33 int main(int, char **) {
    33 int main(int, char **) {
    34 
    34 
    35   typedef ListGraph MutableGraph;
    35   typedef ListGraph MutableGraph;
    36 
    36 
    37   typedef SmartGraph Graph;
    37   //typedef SmartGraph Graph;
    38   //typedef ListGraph Graph;
    38   typedef ListGraph Graph;
    39   typedef Graph::Node Node;
    39   typedef Graph::Node Node;
    40   typedef Graph::EdgeIt EdgeIt;
    40   typedef Graph::EdgeIt EdgeIt;
    41 
    41 
    42 
    42 
    43 //   Mize mize[10];
    43 //   Mize mize[10];
    83 //   //cgw.erase(csw);
    83 //   //cgw.erase(csw);
    84 //   std::cout << "p2:" << cgw.nodeNum() << std::endl;
    84 //   std::cout << "p2:" << cgw.nodeNum() << std::endl;
    85 
    85 
    86 
    86 
    87   {
    87   {
    88     std::cout << "SmartGraph..." << std::endl;
    88     //std::cout << "SmartGraph..." << std::endl;
    89     std::cout << "edmonds karp demo (physical blocking flow augmentation)..." << std::endl;
    89     std::cout << "edmonds karp demo (physical blocking flow augmentation)..." << std::endl;
    90     Graph::EdgeMap<int> flow(G); //0 flow
    90     Graph::EdgeMap<int> flow(G); //0 flow
    91 
    91 
    92     Timer ts;
    92     Timer ts;
    93     ts.reset();
    93     ts.reset();
   112     std::cout << "number of augmentation phases: " << i << std::endl; 
   112     std::cout << "number of augmentation phases: " << i << std::endl; 
   113     std::cout << "flow value: "<< max_flow_test.flowValue() << std::endl;
   113     std::cout << "flow value: "<< max_flow_test.flowValue() << std::endl;
   114   }
   114   }
   115 
   115 
   116   {
   116   {
   117     std::cout << "SmartGraph..." << std::endl;
   117     //std::cout << "SmartGraph..." << std::endl;
   118     std::cout << "edmonds karp demo (physical blocking flow 1 augmentation)..." << std::endl;
   118     std::cout << "edmonds karp demo (physical blocking flow 1 augmentation)..." << std::endl;
   119     Graph::EdgeMap<int> flow(G); //0 flow
   119     Graph::EdgeMap<int> flow(G); //0 flow
   120 
   120 
   121     Timer ts;
   121     Timer ts;
   122     ts.reset();
   122     ts.reset();