@Override public long getEstimatedSize() { long estimatedSize = INSTANCE_SIZE; if (digest != null) { estimatedSize += digest.estimatedInMemorySizeInBytes(); } if (percentiles != null) { estimatedSize += SizeOf.sizeOfDoubleArray(percentiles.size()); } return estimatedSize; } }
public static long sizeOf(double[] array) { return (array == null) ? 0 : sizeOfDoubleArray(array.length); }
public static long sizeOf(double[] array) { return (array == null) ? 0 : sizeOfDoubleArray(array.length); }
@Override public long getEstimatedSize() { long estimatedSize = INSTANCE_SIZE; if (digest != null) { estimatedSize += digest.estimatedInMemorySizeInBytes(); } if (percentiles != null) { estimatedSize += SizeOf.sizeOfDoubleArray(percentiles.size()); } return estimatedSize; } }
@Override public long getEstimatedSize() { long estimatedSize = INSTANCE_SIZE; if (digest != null) { estimatedSize += digest.estimatedInMemorySizeInBytes(); } if (percentiles != null) { estimatedSize += SizeOf.sizeOfDoubleArray(percentiles.size()); } return estimatedSize; } }
/** * Creates a slice over the specified array range. * * @param offset the array position at which the slice begins * @param length the number of array positions to include in the slice */ Slice(double[] base, int offset, int length) { requireNonNull(base, "base is null"); checkPositionIndexes(offset, offset + length, base.length); this.base = base; this.address = sizeOfDoubleArray(offset); this.size = multiplyExact(length, ARRAY_DOUBLE_INDEX_SCALE); this.retainedSize = INSTANCE_SIZE + sizeOf(base); this.reference = (offset == 0 && length == base.length) ? COMPACT : NOT_COMPACT; }
/** * Creates a slice over the specified array range. * * @param offset the array position at which the slice begins * @param length the number of array positions to include in the slice */ Slice(double[] base, int offset, int length) { requireNonNull(base, "base is null"); checkPositionIndexes(offset, offset + length, base.length); this.base = base; this.address = sizeOfDoubleArray(offset); this.size = multiplyExact(length, ARRAY_DOUBLE_INDEX_SCALE); this.retainedSize = INSTANCE_SIZE + sizeOf(base); this.reference = (offset == 0 && length == base.length) ? COMPACT : NOT_COMPACT; }