COIN-OR::LEMON - Graph Library

Changeset 901:30d5f950aa5f in lemon-1.2 for lemon


Ignore:
Timestamp:
02/25/11 21:37:47 (9 years ago)
Author:
Alpar Juttner <alpar@…>
Branch:
default
Children:
902:79fab87ee483, 903:8ae2627aba1a
Phase:
public
Message:

Fix wrong initialization in Preflow (#414)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/preflow.h

    r894 r901  
    526526          _flow->set(e, (*_capacity)[e]);
    527527          (*_excess)[u] += rem;
    528           if (u != _target && !_level->active(u)) {
    529             _level->activate(u);
    530           }
    531528        }
    532529      }
     
    538535          _flow->set(e, 0);
    539536          (*_excess)[v] += rem;
    540           if (v != _target && !_level->active(v)) {
    541             _level->activate(v);
    542           }
    543         }
    544       }
     537        }
     538      }
     539      for (NodeIt n(_graph); n != INVALID; ++n)
     540        if(n!=_source && n!=_target && _tolerance.positive((*_excess)[n]))
     541          _level->activate(n);
     542         
    545543      return true;
    546544    }
Note: See TracChangeset for help on using the changeset viewer.