COIN-OR::LEMON - Graph Library

Changeset 986:e997802b855c in lemon-0.x for src/work/marci/preflow_bug.cc


Ignore:
Timestamp:
11/13/04 13:53:28 (16 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1376
Message:

Naming changes:

  • head -> target
  • tail -> source
File:
1 edited

Legend:

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

    r921 r986  
    4646    Graph::EdgeIt e;
    4747    for (g.first(e); g.valid(e); g.next(e))
    48       cout << 1+g.id(g.tail(e)) << "->" << 1+g.id(g.head(e)) << " cap: " << cap[e] << " preflow: " << flow[e] << endl;
     48      cout << 1+g.id(g.source(e)) << "->" << 1+g.id(g.target(e)) << " cap: " << cap[e] << " preflow: " << flow[e] << endl;
    4949  }
    5050  {
     
    7676    Graph::EdgeIt e;
    7777    for (g.first(e); g.valid(e); g.next(e)) {
    78       if (cut[g.tail(e)] && !cut[g.head(e)]) {
    79         cout << 1+g.id(g.tail(e)) << "->" << 1+g.id(g.head(e))
     78      if (cut[g.source(e)] && !cut[g.target(e)]) {
     79        cout << 1+g.id(g.source(e)) << "->" << 1+g.id(g.target(e))
    8080             << "(forward edge) flow: " << flow[e]
    8181             << " cap: " << cap[e]<< endl;
     
    8383        std::cout << "Slackness does not hold!" << std::endl;
    8484      }
    85       if (!cut[g.tail(e)] && cut[g.head(e)]) {
    86         cout << 1+g.id(g.tail(e)) << "->" << 1+g.id(g.head(e))
     85      if (!cut[g.source(e)] && cut[g.target(e)]) {
     86        cout << 1+g.id(g.source(e)) << "->" << 1+g.id(g.target(e))
    8787             << "(backward edge) flow: " << flow[e] << endl;
    8888        if (flow[e]!=0)
     
    106106
    107107//     FOR_EACH_LOC(Graph::EdgeIt, e, g) {
    108 //       if (cut[g.tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e])
    109 //      std::cout << "Slackness does not hold!" << std::endl;
    110 //       if (!cut[g.tail(e)] && cut[g.head(e)] && flow[e]>0)
     108//       if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e])
     109//      std::cout << "Slackness does not hold!" << std::endl;
     110//       if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0)
    111111//      std::cout << "Slackness does not hold!" << std::endl;
    112112//     }
     
    122122
    123123//     FOR_EACH_LOC(Graph::EdgeIt, e, g) {
    124 //       if (cut[g.tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e])
    125 //      std::cout << "Slackness does not hold!" << std::endl;
    126 //       if (!cut[g.tail(e)] && cut[g.head(e)] && flow[e]>0)
     124//       if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e])
     125//      std::cout << "Slackness does not hold!" << std::endl;
     126//       if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0)
    127127//      std::cout << "Slackness does not hold!" << std::endl;
    128128//     }
     
    149149
    150150//     FOR_EACH_LOC(Graph::EdgeIt, e, g) {
    151 //       if (cut[g.tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e])
    152 //      std::cout << "Slackness does not hold!" << std::endl;
    153 //       if (!cut[g.tail(e)] && cut[g.head(e)] && flow[e]>0)
     151//       if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e])
     152//      std::cout << "Slackness does not hold!" << std::endl;
     153//       if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0)
    154154//      std::cout << "Slackness does not hold!" << std::endl;
    155155//     }
     
    178178
    179179//     FOR_EACH_LOC(Graph::EdgeIt, e, g) {
    180 //       if (cut[g.tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e])
    181 //      std::cout << "Slackness does not hold!" << std::endl;
    182 //       if (!cut[g.tail(e)] && cut[g.head(e)] && flow[e]>0)
     180//       if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e])
     181//      std::cout << "Slackness does not hold!" << std::endl;
     182//       if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0)
    183183//      std::cout << "Slackness does not hold!" << std::endl;
    184184//     }
     
    196196
    197197//     FOR_EACH_LOC(Graph::EdgeIt, e, g) {
    198 //       if (cut[g.tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e])
    199 //      std::cout << "Slackness does not hold!" << std::endl;
    200 //       if (!cut[g.tail(e)] && cut[g.head(e)] && flow[e]>0)
     198//       if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e])
     199//      std::cout << "Slackness does not hold!" << std::endl;
     200//       if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0)
    201201//      std::cout << "Slackness does not hold!" << std::endl;
    202202//     }
     
    214214
    215215//     FOR_EACH_LOC(Graph::EdgeIt, e, g) {
    216 //       if (cut[g.tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e])
    217 //      std::cout << "Slackness does not hold!" << std::endl;
    218 //       if (!cut[g.tail(e)] && cut[g.head(e)] && flow[e]>0)
     216//       if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e])
     217//      std::cout << "Slackness does not hold!" << std::endl;
     218//       if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0)
    219219//      std::cout << "Slackness does not hold!" << std::endl;
    220220//     }
Note: See TracChangeset for help on using the changeset viewer.