|
Colt 1.2.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object hep.aida.ref.Histogram hep.aida.ref.AbstractHistogram1D hep.aida.ref.Histogram1D
A reference implementation of hep.aida.IHistogram1D. The goal is to provide a clear implementation rather than the most efficient implementation. However, performance seems fine - filling 1.2 * 10^6 points/sec, both using FixedAxis or VariableAxis.
Field Summary |
Fields inherited from interface hep.aida.IHistogram |
OVERFLOW, serialVersionUID, UNDERFLOW |
Constructor Summary | |
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. |
Method Summary | |
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. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface hep.aida.IHistogram1D |
minMaxBins, xAxis |
Methods inherited from interface hep.aida.IHistogram |
dimensions, entries, extraEntries, sumAllBinHeights, sumBinHeights, sumExtraBinHeights, title |
Constructor Detail |
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 Histogram1D(String title, IAxis axis)
title
- The histogram title.axis
- The axis description to be used for binning.Method Detail |
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
|
Colt 1.2.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |