code: public static DoublesSketch heapify(final Memory srcMem) {
      if (checkIsCompactMemory(srcMem)) {
        return CompactDoublesSketch.heapify(srcMem);
      }
      return UpdateDoublesSketch.heapify(srcMem);
    }
docs: Heapify takes the sketch image in Memory and instantiates an on-heap Sketch.
  The resulting sketch will not retain any link to the source Memory.
  @param srcMem a Memory image of a Sketch.
  <a href="{@docRoot}/resources/dictionary.html#mem">See Memory</a>
  @return a heap-based Sketch based on the given Memory