Changeset 1205:a9a3354b01d4 in lemon-0.x for src/lemon/radix_heap.h
- Timestamp:
- 03/09/05 15:06:32 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1624
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/lemon/radix_heap.h
r1186 r1205 31 31 /// @{ 32 32 33 /// A BinaryHeap implementation.33 /// A Radix Heap implementation. 34 34 35 35 ///\todo Please document... … … 157 157 /// \brief Move an item up into the proper box. 158 158 void bubble_up(int index) { 159 if (!lower(data[index].box, index)) return;159 if (!lower(data[index].box, data[index].prio)) return; 160 160 remove(index); 161 161 int box = findUp(data[index].box, data[index].prio); … … 335 335 } 336 336 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 // } 347 347 348 348 }; // class RadixHeap
Note: See TracChangeset
for help on using the changeset viewer.