code: private void convertToHeap() {
      if (h_ < 2) {
        return; // nothing to do
      }
  
      final int lastSlot = h_ - 1;
      final int lastNonLeaf = ((lastSlot + 1) / 2) - 1;
  
      for (int j = lastNonLeaf; j >= 0; --j) {
        restoreTowardsLeaves(j);
      }
  
      //validateHeap();
    }
docs: /* Converts the data_ and weights_ arrays to heaps. In contrast to other parts
  of the library, this has nothing to do with on- or off-heap storage or the
  Memory package.