| 1382 | } |
| 1383 | |
| 1384 | void MANUAL_HEAP::MoveDown(int heap_index){ |
| 1385 | int l = heap_index * 2 + 1; |
| 1386 | PointType_CMP tmp = heap[heap_index]; |
| 1387 | while (l < heap_size){ |
| 1388 | if (l + 1 < heap_size && heap[l] < heap[l+1]) l++; |
| 1389 | if (tmp < heap[l]){ |
| 1390 | heap[heap_index] = heap[l]; |
| 1391 | heap_index = l; |
| 1392 | l = heap_index * 2 + 1; |
| 1393 | } else break; |
| 1394 | } |
| 1395 | heap[heap_index] = tmp; |
| 1396 | return; |
| 1397 | } |
| 1398 | |
| 1399 | void MANUAL_HEAP::FloatUp(int heap_index){ |
| 1400 | int ancestor = (heap_index-1)/2; |
nothing calls this directly
no outgoing calls
no test coverage detected