public class GKArray extends java.lang.Object implements QuantileSketch<GKArray>
| Constructor and Description |
|---|
GKArray(double rankAccuracy) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(double value)
Adds a value to the sketch.
|
void |
accept(double value,
long count)
Adds a value to the sketch as many times as specified by
count. |
GKArray |
copy() |
double |
getCount() |
double |
getMaxValue() |
double |
getMinValue() |
double |
getRankAccuracy() |
double |
getValueAtQuantile(double quantile) |
double[] |
getValuesAtQuantiles(double[] quantiles) |
boolean |
isEmpty() |
void |
mergeWith(GKArray other)
Merges the other sketch into this one.
|
public double getRankAccuracy()
public void accept(double value)
QuantileSketchaccept in interface QuantileSketch<GKArray>accept in interface java.util.function.DoubleConsumervalue - the value to be addedpublic void accept(double value,
long count)
QuantileSketchcount.accept in interface QuantileSketch<GKArray>value - the value to be addedcount - the number of times the value is to be addedpublic void mergeWith(GKArray other)
QuantileSketchmergeWith in interface QuantileSketch<GKArray>other - the sketch to be merged into this onepublic GKArray copy()
copy in interface QuantileSketch<GKArray>public boolean isEmpty()
isEmpty in interface QuantileSketch<GKArray>public double getCount()
getCount in interface QuantileSketch<GKArray>public double getMinValue()
getMinValue in interface QuantileSketch<GKArray>public double getMaxValue()
getMaxValue in interface QuantileSketch<GKArray>public double getValueAtQuantile(double quantile)
getValueAtQuantile in interface QuantileSketch<GKArray>quantile - a number between 0 and 1 (both included)public double[] getValuesAtQuantiles(double[] quantiles)
getValuesAtQuantiles in interface QuantileSketch<GKArray>quantiles - number between 0 and 1 (both included)