Histogram, java.io.Serializablepublic class HistogramReweightedData extends java.lang.Object implements Histogram, java.io.Serializable
| Modifier and Type | Field | Description |
|---|---|---|
protected double |
deltaX |
|
protected double[] |
histogram |
|
protected int |
nBins |
|
protected double[] |
sums |
|
protected double |
weightSum |
|
protected double |
xMax |
|
protected double |
xMin |
|
protected double[] |
xValues |
| Constructor | Description |
|---|---|
HistogramReweightedData(int n,
DoubleRange xRange) |
Makes a new histogram instance, with the range of x values given by
xRange and n bins.
|
HistogramReweightedData(DoubleRange xRange) |
Makes a new histogram instance, with the range of x values given by
xRange.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
addValue(double x) |
Adds the given value to the Histogram
|
void |
addValue(double x,
double y) |
|
long |
getCount() |
Returns the number of times the Histogram's addValue method was called.
|
double[] |
getHistogram() |
Returns the histogram as an array of doubles
|
int |
getNBins() |
Returns the number of bins in the histogram.
|
DoubleRange |
getXRange() |
Returns the range of x values (min and max) used in the histogram.
|
void |
reset() |
resets all histogram values and counts to zero
|
void |
setNBins(int n) |
Sets the number of bins used by the Histogram.
|
void |
setXRange(DoubleRange xRange) |
Sets the range of x values used in the histogram (min and max).
|
double[] |
xValues() |
Returns the x values from the histogram as an array of doubles
|
protected double deltaX
protected double weightSum
protected double[] sums
protected double[] histogram
protected double[] xValues
protected double xMin
protected double xMax
protected int nBins
public HistogramReweightedData(DoubleRange xRange)
public HistogramReweightedData(int n,
DoubleRange xRange)
public void reset()
Histogrampublic void addValue(double x,
double y)
public void addValue(double x)
Histogrampublic void setXRange(DoubleRange xRange)
Histogrampublic DoubleRange getXRange()
Histogrampublic int getNBins()
Histogrampublic void setNBins(int n)
Histogrampublic double[] getHistogram()
HistogramgetHistogram in interface Histogrampublic long getCount()
Histogram