insertN(memObj, memAdd, 0L);
insertMinDouble(memObj, memAdd, Double.POSITIVE_INFINITY);
insertMaxDouble(memObj, memAdd, Double.NEGATIVE_INFINITY);
final DirectDoublesSketch dds = new DirectDoublesSketch(k);
dds.mem_ = dstMem;
<BUG>dds.memObj_ = memObj;
dds.memAdd_ = memAdd;</BUG>
return dds;
}
<BUG>static DirectDoublesSketch wrapInstance(final Memory srcMem) {
final long memCap = srcMem.getCapacity();
final Object memObj = srcMem.array(); //may be null</BUG>
final long memAdd = srcMem.getCumulativeOffset(0L);

insertN(memObj, memAdd, 0L);
insertMinDouble(memObj, memAdd, Double.POSITIVE_INFINITY);
insertMaxDouble(memObj, memAdd, Double.NEGATIVE_INFINITY);
final DirectDoublesSketch dds = new DirectDoublesSketch(k);
dds.mem_ = dstMem;
return dds;
}
static DirectDoublesSketch wrapInstance(final Memory srcMem) {
final boolean readOnly = srcMem.isReadOnly();
final boolean direct = srcMem.isDirect();
