code: public static DoublesSketch wrap(final Memory srcMem) {
      if (checkIsCompactMemory(srcMem)) {
        return DirectCompactDoublesSketch.wrapInstance(srcMem);
      }
      return DirectUpdateDoublesSketchR.wrapInstance(srcMem);
    }
docs: Wrap this sketch around the given Memory image of a DoublesSketch, compact or non-compact.
  
  @param srcMem the given Memory image of a DoublesSketch that may have data,
  @return a sketch that wraps the given srcMem