@Override
  public int poll() {
    int id = peekId();
    posToId[1] = posToId[size];
    posToValue[1] = posToValue[size];
    idToPos[posToId[1]] = 1;
    idToPos[id] = NOT_PRESENT;
    size--;
    percolateDown(1);
    return id;
  }
@param elements the number of elements that can be stored in this heap. Currently the heap cannot be resized or
                shrunk/trimmed after initial creation. elements-1 is the maximum id that can be stored in this heap
planetiler-core/src/main/java/com/onthegomap/planetiler/collection/ArrayDoubleMinHeap.java