COIN-OR::LEMON - Graph Library

Changeset 1205:a9a3354b01d4 in lemon-0.x for src/lemon/radix_heap.h


Ignore:
Timestamp:
03/09/05 15:06:32 (20 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1624
Message:

Bug fix in radix heap.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/lemon/radix_heap.h

    r1186 r1205  
    3131  /// @{
    3232
    33    /// A Binary Heap implementation.
     33  /// A Radix Heap implementation.
    3434 
    3535  ///\todo Please document...
     
    157157    /// \brief Move an item up into the proper box.
    158158    void bubble_up(int index) {
    159       if (!lower(data[index].box, index)) return;
     159      if (!lower(data[index].box, data[index].prio)) return;
    160160      remove(index);
    161161      int box = findUp(data[index].box, data[index].prio);
     
    335335    }
    336336
    337     void print() const {
    338       for (int i = 0; i < boxes.size(); ++i) {
    339         printf("(%d, %d) ", boxes[i].min, boxes[i].size);
    340         for (int k = boxes[i].first; k != -1; k = data[k].next) {
    341           printf("%d ", data[k].prio);
    342         }
    343         printf("\n");
    344       }
    345       fflush(stdout);
    346     }
     337//     void print() const {
     338//       for (int i = 0; i < boxes.size(); ++i) {
     339//      printf("(%d, %d) ", boxes[i].min, boxes[i].size);
     340//      for (int k = boxes[i].first; k != -1; k = data[k].next) {
     341//        printf("%d ", data[k].prio);
     342//      }
     343//      printf("\n");
     344//       }
     345//       fflush(stdout);
     346//     }
    347347
    348348  }; // class RadixHeap
Note: See TracChangeset for help on using the changeset viewer.