@InterfaceAudience.Public @InterfaceStability.Evolving public class FastLongHistogram extends Object
| Modifier and Type | Field and Description | 
|---|---|
static int | 
DEFAULT_NBINS
Default number of bins. 
 | 
static double[] | 
DEFAULT_QUANTILES  | 
| Constructor and Description | 
|---|
FastLongHistogram()
Constructor. 
 | 
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 | 
getCount()  | 
long | 
getMax()  | 
long | 
getMean()  | 
long | 
getMin()  | 
long | 
getNumAtOrBelow(long value)  | 
long[] | 
getQuantiles()  | 
long[] | 
getQuantiles(double[] quantiles)
Computes the quantiles give the ratios. 
 | 
FastLongHistogram | 
reset()
Resets the histogram for new counting. 
 | 
public static final int DEFAULT_NBINS
public static final double[] DEFAULT_QUANTILES
public FastLongHistogram()
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 long[] getQuantiles()
public long getMin()
public long getMax()
public long getCount()
public long getMean()
public long getNumAtOrBelow(long value)
public FastLongHistogram reset()