@InterfaceAudience.Public @InterfaceStability.Evolving public class FastLongHistogram extends Object
Constructor and Description |
---|
FastLongHistogram(int numOfBins)
Constructor.
|
FastLongHistogram(int numOfBins,
long min,
long max)
Constructor setting the bins assuming a uniform distribution within a range.
|
Modifier and Type | Method and Description |
---|---|
void |
add(long value,
long count)
Adds a value to the histogram.
|
long[] |
getQuantiles(double[] quantiles)
Computes the quantiles give the ratios.
|
void |
reset()
Resets the histogram for new counting.
|
public FastLongHistogram(int numOfBins)
numOfBins
- the number of bins for the histogram. A larger value results in more precise
results but with lower efficiency, and vice versus.public FastLongHistogram(int numOfBins, long min, long max)
numOfBins
- the number of bins for the histogram. A larger value results in more precise
results but with lower efficiency, and vice versus.min
- lower bound of the region, inclusive.max
- higher bound of the region, inclusive.public void add(long value, long count)
public long[] getQuantiles(double[] quantiles)
public void reset()
Copyright © 2007–2015 The Apache Software Foundation. All rights reserved.