public class Histogram1D extends Object implements IHistogram1D
OVERFLOW, serialVersionUID, UNDERFLOW
Constructor and Description |
---|
Histogram1D(String title,
double[] edges)
Creates a variable-width histogram.
|
Histogram1D(String title,
IAxis axis)
Creates a histogram with the given axis binning.
|
Histogram1D(String title,
int bins,
double min,
double max)
Creates a fixed-width histogram.
|
Modifier and Type | Method and Description |
---|---|
int |
allEntries()
Number of all entries in all (both in-range and under/overflow) bins in the histogram.
|
int |
binEntries(int index)
Number of entries in the corresponding bin (ie the number of times fill was called for this bin).
|
double |
binError(int index)
The error on this bin.
|
double |
binHeight(int index)
Total height of the corresponding bin (ie the sum of the weights in this bin).
|
int |
dimensions()
Returns 1 for one-dimensional histograms, 2 for two-dimensional histograms, and so on.
|
int |
entries()
Number of in-range entries in the histogram.
|
double |
equivalentBinEntries()
Number of equivalent entries.
|
int |
extraEntries()
Number of under and overflow entries in the histogram.
|
void |
fill(double x)
Fill histogram with weight 1.
|
void |
fill(double x,
double weight)
Fill histogram with specified weight.
|
double |
mean()
Returns the mean of the whole histogram as calculated on filling-time.
|
int[] |
minMaxBins()
Indexes of the in-range bins containing the smallest and largest binHeight(), respectively.
|
void |
reset()
Reset contents; as if just constructed.
|
double |
rms()
Returns the rms of the whole histogram as calculated on filling-time.
|
double |
sumAllBinHeights()
Sum of all (both in-range and under/overflow) bin heights in the histogram.
|
double |
sumBinHeights()
Sum of in-range bin heights in the histogram.
|
double |
sumExtraBinHeights()
Sum of under/overflow bin heights in the histogram.
|
String |
title()
Title of the histogram (will be set only in the constructor).
|
IAxis |
xAxis()
Returns the X Axis.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
minMaxBins, xAxis
dimensions, entries, extraEntries, sumAllBinHeights, sumBinHeights, sumExtraBinHeights, title
public Histogram1D(String title, double[] edges)
title
- The histogram title.edges
- the bin boundaries the axis shall have;
must be sorted ascending and must not contain multiple identical elements.IllegalArgumentException
- if edges.length < 1.public Histogram1D(String title, int bins, double min, double max)
title
- The histogram title.bins
- The number of bins.min
- The minimum value on the X axis.max
- The maximum value on the X axis.public int allEntries()
IHistogram
allEntries
in interface IHistogram
public int binEntries(int index)
IHistogram1D
binEntries
in interface IHistogram1D
index
- the bin number (0...N-1) or OVERFLOW or UNDERFLOW.public double binError(int index)
IHistogram1D
binError
in interface IHistogram1D
index
- the bin number (0...N-1) or OVERFLOW or UNDERFLOW.public double binHeight(int index)
IHistogram1D
binHeight
in interface IHistogram1D
index
- the bin number (0...N-1) or OVERFLOW or UNDERFLOW.public double equivalentBinEntries()
IHistogram
equivalentBinEntries
in interface IHistogram
public void fill(double x)
IHistogram1D
fill
in interface IHistogram1D
public void fill(double x, double weight)
IHistogram1D
fill
in interface IHistogram1D
public double mean()
IHistogram1D
mean
in interface IHistogram1D
public void reset()
IHistogram
reset
in interface IHistogram
public double rms()
IHistogram1D
rms
in interface IHistogram1D
public int dimensions()
IHistogram
dimensions
in interface IHistogram
public int entries()
IHistogram
entries
in interface IHistogram
public int extraEntries()
IHistogram
extraEntries
in interface IHistogram
public int[] minMaxBins()
IHistogram1D
minMaxBins
in interface IHistogram1D
public double sumAllBinHeights()
IHistogram
sumAllBinHeights
in interface IHistogram
public double sumBinHeights()
IHistogram
sumBinHeights
in interface IHistogram
public double sumExtraBinHeights()
IHistogram
sumExtraBinHeights
in interface IHistogram
public IAxis xAxis()
IHistogram1D
xAxis
in interface IHistogram1D
public String title()
IHistogram
title
in interface IHistogram
Jas4pp 1.5 © Java Analysis Studio for Particle Physics