COIN-OR::LEMON - Graph Library

Changeset 1753:98d83dd56c1d in lemon-0.x


Ignore:
Timestamp:
11/02/05 16:26:04 (14 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2282
Message:

Some change on the clear

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/fib_heap.h

    r1717 r1753  
    117117    ///
    118118    /// Make empty this heap.
    119     void clear() {
    120       for (int i = 0; i < (int)container.size(); ++i) {
    121         iimap[container[i].name] = -2;
     119    void clear() {
     120      if (num_items != 0) {
     121        for (int i = 0; i < (int)container.size(); ++i) {
     122          iimap[container[i].name] = -2;
     123        }
    122124      }
    123125      container.clear(); minimum = 0; num_items = 0;
Note: See TracChangeset for help on using the changeset viewer.