Histogram
public class HistogramExpanding extends HistogramSimple
Constructor | Description |
---|---|
HistogramExpanding() |
Default constructor, making a histogram with deltaX = 1.0.
|
HistogramExpanding(double deltaX) |
Constructs a new instance with the give deltaX bin width and no range.
|
HistogramExpanding(double deltaX,
DoubleRange xRange) |
Constructs a new instance with the given deltaX bin width and
range of X values.
|
HistogramExpanding(int n,
DoubleRange xRange) |
Makes a new histogram instance, with n bins covering the
given range of X values.
|
Modifier and Type | Method | Description |
---|---|---|
void |
addValue(double x) |
Adds the given value to the Histogram
|
double |
getDeltaX() |
|
void |
reset() |
resets all histogram values and counts to zero
|
void |
setDeltaX(double dx) |
|
void |
setNBins(int n) |
Sets the number of bins to n.
|
void |
setXRange(DoubleRange xRange) |
Sets the range of x values used in the histogram (min and max).
|
getBinCounts, getCount, getHistogram, getNBins, getXRange, xValues
public HistogramExpanding()
public HistogramExpanding(double deltaX)
public HistogramExpanding(double deltaX, DoubleRange xRange)
public HistogramExpanding(int n, DoubleRange xRange)
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
public void setNBins(int n)
setNBins
in interface Histogram
setNBins
in class HistogramSimple
public double getDeltaX()
public void setDeltaX(double dx)