COIN-OR::LEMON - Graph Library

Ignore:
Timestamp:
11/13/04 13:53:28 (19 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/max_flow_demo.cc

    r921 r986  
    4848
    4949    for(Graph::EdgeIt e(g); e!=INVALID; ++e) {
    50       if (cut[g.tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e])
     50      if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e])
    5151        std::cout << "Slackness does not hold!" << std::endl;
    52       if (!cut[g.tail(e)] && cut[g.head(e)] && flow[e]>0)
     52      if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0)
    5353        std::cout << "Slackness does not hold!" << std::endl;
    5454    }
     
    6464
    6565    for(Graph::EdgeIt e(g); e!=INVALID; ++e) {
    66       if (cut[g.tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e])
     66      if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e])
    6767        std::cout << "Slackness does not hold!" << std::endl;
    68       if (!cut[g.tail(e)] && cut[g.head(e)] && flow[e]>0)
     68      if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0)
    6969        std::cout << "Slackness does not hold!" << std::endl;
    7070    }
     
    9191
    9292    for(Graph::EdgeIt e(g); e!=INVALID; ++e) {
    93       if (cut[g.tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e])
     93      if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e])
    9494        std::cout << "Slackness does not hold!" << std::endl;
    95       if (!cut[g.tail(e)] && cut[g.head(e)] && flow[e]>0)
     95      if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0)
    9696        std::cout << "Slackness does not hold!" << std::endl;
    9797    }
     
    109109
    110110    for(Graph::EdgeIt e(g); e!=INVALID; ++e) {
    111       if (cut[g.tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e])
     111      if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e])
    112112        std::cout << "Slackness does not hold!" << std::endl;
    113       if (!cut[g.tail(e)] && cut[g.head(e)] && flow[e]>0)
     113      if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0)
    114114        std::cout << "Slackness does not hold!" << std::endl;
    115115    }
     
    127127
    128128    for(Graph::EdgeIt e(g); e!=INVALID; ++e) {
    129       if (cut[g.tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e])
     129      if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e])
    130130        std::cout << "Slackness does not hold!" << std::endl;
    131       if (!cut[g.tail(e)] && cut[g.head(e)] && flow[e]>0)
     131      if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0)
    132132        std::cout << "Slackness does not hold!" << std::endl;
    133133    }
     
    145145
    146146    for(Graph::EdgeIt e(g); e!=INVALID; ++e) {
    147       if (cut[g.tail(e)] && !cut[g.head(e)] && !flow[e]==cap[e])
     147      if (cut[g.source(e)] && !cut[g.target(e)] && !flow[e]==cap[e])
    148148        std::cout << "Slackness does not hold!" << std::endl;
    149       if (!cut[g.tail(e)] && cut[g.head(e)] && flow[e]>0)
     149      if (!cut[g.source(e)] && cut[g.target(e)] && flow[e]>0)
    150150        std::cout << "Slackness does not hold!" << std::endl;
    151151    }
Note: See TracChangeset for help on using the changeset viewer.