Histogrampublic 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, xValuespublic HistogramCollapsing()
public HistogramCollapsing(int n)
public void reset()
Histogramreset in interface Histogramreset in class HistogramSimplepublic void addValue(double x)
HistogramaddValue in interface HistogramaddValue in class HistogramSimplepublic void setXRange(DoubleRange xRange)
HistogramsetXRange in interface HistogramsetXRange in class HistogramSimpleprotected void collapseData(double newX)
public double[] getHistogram()
HistogramgetHistogram in interface HistogramgetHistogram in class HistogramSimple