public class UniformHistogram extends Object implements Histogram
Histogram
that implements uniform binning of numbers (>=0
).Constructor and Description |
---|
UniformHistogram(long binWidth,
int numBins)
Constructs a histogram.
|
Modifier and Type | Method and Description |
---|---|
long |
getCount()
Returns the number of recorded values.
|
int |
getNumBins()
Returns the number of bins.
|
long |
getValue(int index)
Returns the value of the index.
|
void |
update(long value)
Updates the value.
|
public UniformHistogram(long binWidth, int numBins)
binWidth
- the width of each binnumBins
- the number of binspublic void update(long value)
public long getCount()
public long getValue(int index)
public int getNumBins()
getNumBins
in interface Histogram
Copyright © 2017 The Apache Software Foundation. All rights reserved.