docs: private int sinkHeap(int i)
    {
      final RowIterator iteratorToSink = pQueue[i];
      while (true) {
        int left = (i << 1) + 1;
        if (left >= pQueueSize) {
          break;
        }
        int child = left;
        RowIterator childIterator = pQueue[left];
        final int right = left + 1;
        // Setting childrenDiff to non-zero initially, so that if there is just one child (right == pQueueSize),
        // the expression `childrenDiff == 0` below is false.
        int childrenDiff = -1; // any non-zero number
        if (right < pQueueSize) {
          RowIterator rightChildIterator = pQueue[right];
          childrenDiff = rightChildIterator.getPointer().compareTo(childIterator.getPointer());
          if (childrenDiff < 0) {
            child = right;
            childIterator = rightChildIterator;
          }
        }
        int parentDiff = iteratorToSink.getPointer().compareTo(childIterator.getPointer());
        if (parentDiff == 0) {
          equalToChild[i] = true;
          pQueue[i] = iteratorToSink;
          return i;
        }
        if (parentDiff < 0) {
          equalToChild[i] = false;
          pQueue[i] = iteratorToSink;
          return i;
        }
        equalToChild[i] = childrenDiff == 0 || equalToChild[child];
        pQueue[i] = childIterator;
        i = child;
      }
      equalToChild[i] = false; // Since we exited from the above loop, there are no more children
      pQueue[i] = iteratorToSink;
      return i;
    }