Changeset 752:39a5b48bcace in lemon for lemon/fourary_heap.h
- Timestamp:
- 07/10/09 09:17:13 (16 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/fourary_heap.h
r750 r752 166 166 167 167 void bubbleDown(int hole, Pair p, int length) { 168 int child = firstChild(hole); 169 while( child<length && length>1 ) { 170 child = findMin(child,length); 171 if( !less(_data[child], p) ) 172 goto ok; 173 move(_data[child], hole); 174 hole = child; 175 child = firstChild(hole); 168 if( length>1 ) { 169 int child = firstChild(hole); 170 while( child<length ) { 171 child = findMin(child, length); 172 if( !less(_data[child], p) ) 173 goto ok; 174 move(_data[child], hole); 175 hole = child; 176 child = firstChild(hole); 177 } 176 178 } 177 179 ok:
Note: See TracChangeset
for help on using the changeset viewer.