MCPcopy Create free account
hub / github.com/Robotics-STAR-Lab/SOAR / MoveDown

Method MoveDown

src/simulator/local_sensing/include/ikd-Tree/ikd_Tree.cpp:1384–1397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1382}
1383
1384void 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
1399void MANUAL_HEAP::FloatUp(int heap_index){
1400 int ancestor = (heap_index-1)/2;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected