org.apache.datasketches.quantiles

## Class CompactDoublesSketch

- java.lang.Object
- - org.apache.datasketches.quantiles.DoublesSketch
  - - org.apache.datasketches.quantiles.CompactDoublesSketch

All Implemented Interfaces:
  QuantilesAPI, QuantilesDoublesAPI

    public abstract class CompactDoublesSketch
    extends DoublesSketch

Compact sketches are inherently read only.

Author:
  Jon Malkin

### Field Summary

### Fields inherited from interface org.apache.datasketches.quantilescommon.QuantilesAPI

`EMPTY_MSG, MEM_REQ_SVR_NULL_MSG, NOT_SINGLE_ITEM_MSG, SELF_MERGE_MSG, TGT_IS_READ_ONLY_MSG, UNSUPPORTED_MSG`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static CompactDoublesSketch` `heapify(org.apache.datasketches.memory.Memory srcMem)`
`boolean` `isReadOnly()` Returns true if this sketch is read only.
`void` `reset()` Resets this sketch to the empty state.
`void` `update(double quantile)` Updates this sketch with the given item.

### Methods inherited from class org.apache.datasketches.quantiles.DoublesSketch

`builder, downSample, getCDF, getCompactSerialiedSizeBytes, getCurrentCompactSerializedSizeBytes, getCurrentUpdatableSerializedSizeBytes, getK, getKFromEpsilon, getMaxItem, getMinItem, getN, getNormalizedRankError, getNormalizedRankError, getNumRetained, getPMF, getQuantile, getQuantileLowerBound, getQuantiles, getQuantileUpperBound, getRank, getRankLowerBound, getRanks, getRankUpperBound, getSerializedSizeBytes, getSortedView, getUpdatableStorageBytes, hasMemory, isDirect, isEmpty, isEstimationMode, isSameResource, iterator, putMemory, putMemory, toByteArray, toByteArray, toString, toString, toString, toString, wrap`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface org.apache.datasketches.quantilescommon.QuantilesDoublesAPI

`getCDF, getPMF, getQuantile, getQuantiles, getRank, getRanks`

### Method Detail

#### heapify

    public static CompactDoublesSketch heapify(org.apache.datasketches.memory.Memory srcMem)

#### isReadOnly

    public boolean isReadOnly()

Description copied from interface: `QuantilesAPI`
Returns true if this sketch is read only.

Specified by:
  `isReadOnly` in interface `QuantilesAPI`
Specified by:
  `isReadOnly` in class `DoublesSketch`
Returns:
  true if this sketch is read only.

#### reset

    public void reset()

Description copied from class: `DoublesSketch`
Resets this sketch to the empty state. If the sketch is read only this does nothing.

The parameter k will not change.

The parameter k will not change.

Specified by:
  `reset` in interface `QuantilesAPI`
Specified by:
  `reset` in class `DoublesSketch`

#### update

    public void update(double quantile)

Description copied from interface: `QuantilesDoublesAPI`
Updates this sketch with the given item.

Parameters:
  `quantile` - from a stream of items. NaNs are ignored.