public class GKArray extends Object
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)
value
- the value to be addedpublic void accept(double value, long count)
count
.value
- the value to be addedcount
- the number of times the value is to be addedIllegalArgumentException
- if count
is negativepublic void mergeWith(GKArray other)
other
- the sketch to be merged into this oneNullPointerException
- if other
is null
public GKArray copy()
public boolean isEmpty()
public double getCount()
public double getMinValue()
NoSuchElementException
- if the sketch is emptypublic double getMaxValue()
NoSuchElementException
- if the sketch is emptypublic double getValueAtQuantile(double quantile)
quantile
- a number between 0 and 1 (both included)NoSuchElementException
- if the sketch is emptypublic double[] getValuesAtQuantiles(double[] quantiles)
quantiles
- number between 0 and 1 (both included)NoSuchElementException
- if the sketch is emptyCopyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.