COIN-OR::LEMON - Graph Library

Ignore:
Timestamp:
05/07/04 13:57:34 (20 years ago)
Author:
marci
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@753
Message:

top-sort, dimacs mods.

File:
1 edited

Legend:

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

    r555 r577  
    6464
    6565
    66   Graph G;
     66  Graph g;
    6767  Node s, t;
    68   Graph::EdgeMap<int> cap(G);
    69   readDimacsMaxFlow(std::cin, G, s, t, cap);
     68  Graph::EdgeMap<int> cap(g);
     69  //readDimacsMaxFlow(std::cin, g, s, t, cap);
     70  readDimacs(std::cin, g, cap, s, t);
    7071  Timer ts;
    71   Graph::EdgeMap<int> flow(G); //0 flow
     72  Graph::EdgeMap<int> flow(g); //0 flow
    7273  MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >
    73     max_flow_test(G, s, t, cap, flow);
     74    max_flow_test(g, s, t, cap, flow);
    7475
    7576  {
     
    8384  {
    8485    std::cout << "preflow ..." << std::endl;
    85     FOR_EACH_LOC(Graph::EdgeIt, e, G) flow.set(e, 0);
     86    FOR_EACH_LOC(Graph::EdgeIt, e, g) flow.set(e, 0);
    8687    ts.reset();
    8788    max_flow_test.preflow(MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> >::GEN_FLOW);
     
    9293//   {
    9394//     std::cout << "wrapped preflow ..." << std::endl;
    94 //     FOR_EACH_LOC(Graph::EdgeIt, e, G) flow.set(e, 0);
     95//     FOR_EACH_LOC(Graph::EdgeIt, e, g) flow.set(e, 0);
    9596//     ts.reset();
    9697//     pre_flow_res.run();
     
    101102  {
    102103    std::cout << "physical blocking flow augmentation ..." << std::endl;
    103     FOR_EACH_LOC(Graph::EdgeIt, e, G) flow.set(e, 0);
     104    FOR_EACH_LOC(Graph::EdgeIt, e, g) flow.set(e, 0);
    104105    ts.reset();
    105106    int i=0;
     
    112113//   {
    113114//     std::cout << "faster physical blocking flow augmentation ..." << std::endl;
    114 //     FOR_EACH_LOC(Graph::EdgeIt, e, G) flow.set(e, 0);
     115//     FOR_EACH_LOC(Graph::EdgeIt, e, g) flow.set(e, 0);
    115116//     ts.reset();
    116117//     int i=0;
     
    123124  {
    124125    std::cout << "on-the-fly blocking flow augmentation ..." << std::endl;
    125     FOR_EACH_LOC(Graph::EdgeIt, e, G) flow.set(e, 0);
     126    FOR_EACH_LOC(Graph::EdgeIt, e, g) flow.set(e, 0);
    126127    ts.reset();
    127128    int i=0;
     
    134135  {
    135136    std::cout << "on-the-fly shortest path augmentation ..." << std::endl;
    136     FOR_EACH_LOC(Graph::EdgeIt, e, G) flow.set(e, 0);
     137    FOR_EACH_LOC(Graph::EdgeIt, e, g) flow.set(e, 0);
    137138    ts.reset();
    138139    int i=0;
Note: See TracChangeset for help on using the changeset viewer.