Changeset 80:629b9ca9184b in lemon-0.x
- Timestamp:
- 02/16/04 17:27:49 (21 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@103
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/work/alpar/f_ed_ka.h
r74 r80 76 76 77 77 // Augmenting value computation 78 aug_val = visited.get(t)== 2?78 aug_val = visited.get(t)==1 ? 79 79 c.get(tree.get(t))-f.get(tree.get(t)) : f.get(tree.get(t)); 80 80 //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) 83 83 { 84 84 //FIXME: nonstandars. gcc extension! 85 85 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)); 87 87 } 88 88 else { 89 89 //FIXME: nonstandars. gcc extension! 90 90 aug_val <?= f.get(tree.get(gn)); 91 gn=G. from(tree.get(gn));91 gn=G.head(tree.get(gn)); 92 92 } 93 93 94 94 // The augmentation itself 95 95 gn = t; 96 while(gn!=s) if(visited.get(gn)== 2)96 while(gn!=s) if(visited.get(gn)==1) 97 97 { 98 98 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)); 100 100 } 101 101 else { 102 102 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)); 104 104 } 105 105
Note: See TracChangeset
for help on using the changeset viewer.