|
Colt 1.2.0 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objecthep.aida.ref.Histogram
hep.aida.ref.AbstractHistogram2D
hep.aida.ref.Histogram2D
A reference implementation of hep.aida.IHistogram2D. The goal is to provide a clear implementation rather than the most efficient implementation. However, performance seems fine - filling 6 * 10^5 points/sec, both using FixedAxis or VariableAxis.
| Field Summary |
| Fields inherited from interface hep.aida.IHistogram |
OVERFLOW, serialVersionUID, UNDERFLOW |
| Constructor Summary | |
Histogram2D(String title,
double[] xEdges,
double[] yEdges)
Creates a variable-width histogram. |
|
Histogram2D(String title,
IAxis xAxis,
IAxis yAxis)
Creates a histogram with the given axis binning. |
|
Histogram2D(String title,
int xBins,
double xMin,
double xMax,
int yBins,
double yMin,
double yMax)
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 indexX,
int indexY)
The number of entries (ie the number of times fill was called for this bin). |
int |
binEntriesX(int indexX)
Equivalent to projectionX().binEntries(indexX). |
int |
binEntriesY(int indexY)
Equivalent to projectionY().binEntries(indexY). |
double |
binError(int indexX,
int indexY)
The error on this bin. |
double |
binHeight(int indexX,
int indexY)
Total height of the corresponding bin (ie the sum of the weights in this bin). |
double |
binHeightX(int indexX)
Equivalent to projectionX().binHeight(indexX). |
double |
binHeightY(int indexY)
Equivalent to projectionY().binHeight(indexY). |
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,
double y)
Fill the histogram with weight 1. |
void |
fill(double x,
double y,
double weight)
Fill the histogram with specified weight. |
double |
meanX()
Returns the mean of the histogram, as calculated on filling-time projected on the X axis. |
double |
meanY()
Returns the mean of the histogram, as calculated on filling-time projected on the Y axis. |
int[] |
minMaxBins()
Indexes of the in-range bins containing the smallest and largest binHeight(), respectively. |
IHistogram1D |
projectionX()
Create a projection parallel to the X axis. |
IHistogram1D |
projectionY()
Create a projection parallel to the Y axis. |
void |
reset()
Reset contents; as if just constructed. |
double |
rmsX()
Returns the rms of the histogram as calculated on filling-time projected on the X axis. |
double |
rmsY()
Returns the rms of the histogram as calculated on filling-time projected on the Y axis. |
IHistogram1D |
sliceX(int indexY)
Slice parallel to the Y axis at bin indexY and one bin wide. |
IHistogram1D |
sliceX(int indexY1,
int indexY2)
Create a slice parallel to the axis X axis, between "indexY1" and "indexY2" (inclusive). |
IHistogram1D |
sliceY(int indexX)
Slice parallel to the X axis at bin indexX and one bin wide. |
IHistogram1D |
sliceY(int indexX1,
int indexX2)
Create a slice parallel to the axis Y axis, between "indexX1" and "indexX2" (inclusive) The returned IHistogram1D represents an instantaneous snapshot of the histogram at the time the slice was created. |
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()
Return the X axis. |
IAxis |
yAxis()
Return the Y axis. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface hep.aida.IHistogram2D |
binEntriesX, binEntriesY, binHeightX, binHeightY, minMaxBins, projectionX, projectionY, sliceX, sliceX, sliceY, sliceY, xAxis, yAxis |
| Methods inherited from interface hep.aida.IHistogram |
dimensions, entries, extraEntries, sumBinHeights, sumExtraBinHeights, title |
| Constructor Detail |
public Histogram2D(String title,
double[] xEdges,
double[] yEdges)
title - The histogram title.xEdges - the bin boundaries the x-axis shall have;
must be sorted ascending and must not contain multiple identical elements.yEdges - the bin boundaries the y-axis shall have;
must be sorted ascending and must not contain multiple identical elements.
IllegalArgumentException - if xEdges.length < 1 || yEdges.length < 1.
public Histogram2D(String title,
int xBins,
double xMin,
double xMax,
int yBins,
double yMin,
double yMax)
title - The histogram title.xBins - The number of bins on the X axis.xMin - The minimum value on the X axis.xMax - The maximum value on the X axis.yBins - The number of bins on the Y axis.yMin - The minimum value on the Y axis.yMax - The maximum value on the Y axis.
public Histogram2D(String title,
IAxis xAxis,
IAxis yAxis)
title - The histogram title.xAxis - The x-axis description to be used for binning.yAxis - The y-axis description to be used for binning.| Method Detail |
public int allEntries()
IHistogram
allEntries in interface IHistogram
public int binEntries(int indexX,
int indexY)
IHistogram2D
binEntries in interface IHistogram2DindexX - the x bin number (0...Nx-1) or OVERFLOW or UNDERFLOW.indexY - the y bin number (0...Ny-1) or OVERFLOW or UNDERFLOW.
public double binError(int indexX,
int indexY)
IHistogram2D
binError in interface IHistogram2DindexX - the x bin number (0...Nx-1) or OVERFLOW or UNDERFLOW.indexY - the y bin number (0...Ny-1) or OVERFLOW or UNDERFLOW.
public double binHeight(int indexX,
int indexY)
IHistogram2D
binHeight in interface IHistogram2DindexX - the x bin number (0...Nx-1) or OVERFLOW or UNDERFLOW.indexY - the y bin number (0...Ny-1) or OVERFLOW or UNDERFLOW.public double equivalentBinEntries()
IHistogram
equivalentBinEntries in interface IHistogram
public void fill(double x,
double y)
IHistogram2D
fill in interface IHistogram2D
public void fill(double x,
double y,
double weight)
IHistogram2D
fill in interface IHistogram2Dpublic double meanX()
IHistogram2D
meanX in interface IHistogram2Dpublic double meanY()
IHistogram2D
meanY in interface IHistogram2Dpublic void reset()
IHistogram
reset in interface IHistogrampublic double rmsX()
IHistogram2D
rmsX in interface IHistogram2Dpublic double rmsY()
IHistogram2D
rmsY in interface IHistogram2Dpublic double sumAllBinHeights()
IHistogram
sumAllBinHeights in interface IHistogrampublic int binEntriesX(int indexX)
IHistogram2D
binEntriesX in interface IHistogram2Dpublic int binEntriesY(int indexY)
IHistogram2D
binEntriesY in interface IHistogram2Dpublic double binHeightX(int indexX)
IHistogram2D
binHeightX in interface IHistogram2Dpublic double binHeightY(int indexY)
IHistogram2D
binHeightY in interface IHistogram2Dpublic int dimensions()
IHistogram
dimensions in interface IHistogrampublic int entries()
IHistogram
entries in interface IHistogrampublic int extraEntries()
IHistogram
extraEntries in interface IHistogrampublic int[] minMaxBins()
IHistogram2D
minMaxBins in interface IHistogram2Dpublic IHistogram1D projectionX()
IHistogram2D
projectionX in interface IHistogram2Dpublic IHistogram1D projectionY()
IHistogram2D
projectionY in interface IHistogram2Dpublic IHistogram1D sliceX(int indexY)
IHistogram2D
sliceX in interface IHistogram2D
public IHistogram1D sliceX(int indexY1,
int indexY2)
IHistogram2D
sliceX in interface IHistogram2Dpublic IHistogram1D sliceY(int indexX)
IHistogram2D
sliceY in interface IHistogram2D
public IHistogram1D sliceY(int indexX1,
int indexX2)
IHistogram2D
sliceY in interface IHistogram2Dpublic double sumBinHeights()
IHistogram
sumBinHeights in interface IHistogrampublic double sumExtraBinHeights()
IHistogram
sumExtraBinHeights in interface IHistogrampublic IAxis xAxis()
IHistogram2D
xAxis in interface IHistogram2Dpublic IAxis yAxis()
IHistogram2D
yAxis in interface IHistogram2Dpublic 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 | ||||||||||