COIN-OR::LEMON - Graph Library

Changeset 80:629b9ca9184b in lemon-0.x


Ignore:
Timestamp:
02/16/04 17:27:49 (21 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@103
Message:

Several bugfixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/work/alpar/f_ed_ka.h

    r74 r80  
    7676
    7777    // Augmenting value computation
    78     aug_val = visited.get(t)==2 ?
     78    aug_val = visited.get(t)==1 ?
    7979      c.get(tree.get(t))-f.get(tree.get(t)) : f.get(tree.get(t));
    8080    //FIXME: I would need 'G.opposite(e,n)'
    81     gn = visited.get(t)==2 ? G.from(tree.get(t)) : G.to(tree.get(t));
    82     while(gn!=s) if(visited.get(gn)==2)
     81    gn = visited.get(t)==1 ? G.tail(tree.get(t)) : G.head(tree.get(t));
     82    while(gn!=s) if(visited.get(gn)==1)
    8383      {
    8484        //FIXME: nonstandars. gcc extension!
    8585        aug_val <?= c.get(tree.get(gn))-f.get(tree.get(gn));
    86         gn=G.from(tree.get(gn));
     86        gn=G.tail(tree.get(gn));
    8787      }
    8888    else {
    8989      //FIXME: nonstandars. gcc extension!
    9090      aug_val <?= f.get(tree.get(gn));
    91       gn=G.from(tree.get(gn));
     91      gn=G.head(tree.get(gn));
    9292    }
    9393       
    9494    // The augmentation itself
    9595    gn = t;
    96     while(gn!=s) if(visited.get(gn)==2)
     96    while(gn!=s) if(visited.get(gn)==1)
    9797      {
    9898        f.set(tree.get(gn),f.get(tree.get(gn))+aug_val);
    99         gn=G.from(tree.get(gn));
     99        gn=G.tail(tree.get(gn));
    100100      }
    101101    else {
    102102      f.set(tree.get(gn),f.get(tree.get(gn))-aug_val);
    103       gn=G.from(tree.get(gn));
     103      gn=G.head(tree.get(gn));
    104104    }
    105105
Note: See TracChangeset for help on using the changeset viewer.