Histogram
public class HistogramCollapsing extends HistogramSimple
Modifier and Type | Field | Description |
---|---|---|
protected double |
firstValue |
|
protected long |
firstValueCount |
Constructor | Description |
---|---|
HistogramCollapsing() |
Default constructor, making a 100-bin histogram.
|
HistogramCollapsing(int n) |
Makes a new histogram instance having a number of bins given by the argument.
|
Modifier and Type | Method | Description |
---|---|---|
void |
addValue(double x) |
Adds the given value to the Histogram
|
protected void |
collapseData(double newX) |
Collapses existing data and expands x range sufficiently so that the
given x value is within the range of the histogram.
|
double[] |
getHistogram() |
Returns the histogram as an array of doubles
|
void |
reset() |
resets all histogram values and counts to zero
|
void |
setXRange(DoubleRange xRange) |
Sets the range of x values used in the histogram (min and max).
|
getBinCounts, getCount, getNBins, getXRange, setNBins, xValues
public HistogramCollapsing()
public HistogramCollapsing(int n)
public void reset()
Histogram
reset
in interface Histogram
reset
in class HistogramSimple
public void addValue(double x)
Histogram
addValue
in interface Histogram
addValue
in class HistogramSimple
public void setXRange(DoubleRange xRange)
Histogram
setXRange
in interface Histogram
setXRange
in class HistogramSimple
protected void collapseData(double newX)
public double[] getHistogram()
Histogram
getHistogram
in interface Histogram
getHistogram
in class HistogramSimple