|
Parallel Colt 0.9.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthep.aida.tfloat.ref.FloatHistogram2D
public class FloatHistogram2D
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.tfloat.FloatIHistogram |
---|
OVERFLOW, UNDERFLOW |
Constructor Summary | |
---|---|
FloatHistogram2D(String title,
float[] xEdges,
float[] yEdges)
Creates a variable-width histogram. |
|
FloatHistogram2D(String title,
FloatIAxis xAxis,
FloatIAxis yAxis)
Creates a histogram with the given axis binning. |
|
FloatHistogram2D(String title,
int xBins,
float xMin,
float xMax,
int yBins,
float yMin,
float 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). |
float |
binError(int indexX,
int indexY)
The error on this bin. |
float |
binHeight(int indexX,
int indexY)
Total height of the corresponding bin (ie the sum of the weights in this bin). |
float |
binHeightX(int indexX)
Equivalent to projectionX().binHeight(indexX). |
float |
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. |
float |
equivalentBinEntries()
Number of equivalent entries. |
int |
extraEntries()
Number of under and overflow entries in the histogram. |
void |
fill(float x,
float y)
Fill the histogram with weight 1. |
void |
fill(float x,
float y,
float weight)
Fill the histogram with specified weight. |
float |
meanX()
Returns the mean of the histogram, as calculated on filling-time projected on the X axis. |
float |
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. |
FloatIHistogram1D |
projectionX()
Create a projection parallel to the X axis. |
FloatIHistogram1D |
projectionY()
Create a projection parallel to the Y axis. |
void |
reset()
Reset contents; as if just constructed. |
float |
rmsX()
Returns the rms of the histogram as calculated on filling-time projected on the X axis. |
float |
rmsY()
Returns the rms of the histogram as calculated on filling-time projected on the Y axis. |
FloatIHistogram1D |
sliceX(int indexY)
Slice parallel to the Y axis at bin indexY and one bin wide. |
FloatIHistogram1D |
sliceX(int indexY1,
int indexY2)
Create a slice parallel to the axis X axis, between "indexY1" and "indexY2" (inclusive). |
FloatIHistogram1D |
sliceY(int indexX)
Slice parallel to the X axis at bin indexX and one bin wide. |
FloatIHistogram1D |
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. |
float |
sumAllBinHeights()
Sum of all (both in-range and under/overflow) bin heights in the histogram. |
float |
sumBinHeights()
Sum of in-range bin heights in the histogram. |
float |
sumExtraBinHeights()
Sum of under/overflow bin heights in the histogram. |
String |
title()
Title of the histogram (will be set only in the constructor). |
FloatIAxis |
xAxis()
Return the X axis. |
FloatIAxis |
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.tfloat.FloatIHistogram2D |
---|
binEntriesX, binEntriesY, binHeightX, binHeightY, minMaxBins, projectionX, projectionY, sliceX, sliceX, sliceY, sliceY, xAxis, yAxis |
Methods inherited from interface hep.aida.tfloat.FloatIHistogram |
---|
dimensions, entries, extraEntries, sumBinHeights, sumExtraBinHeights, title |
Constructor Detail |
---|
public FloatHistogram2D(String title, float[] xEdges, float[] 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 FloatHistogram2D(String title, int xBins, float xMin, float xMax, int yBins, float yMin, float 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 FloatHistogram2D(String title, FloatIAxis xAxis, FloatIAxis 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()
FloatIHistogram
allEntries
in interface FloatIHistogram
public int binEntries(int indexX, int indexY)
FloatIHistogram2D
binEntries
in interface FloatIHistogram2D
indexX
- the x bin number (0...Nx-1) or OVERFLOW or UNDERFLOW.indexY
- the y bin number (0...Ny-1) or OVERFLOW or UNDERFLOW.public float binError(int indexX, int indexY)
FloatIHistogram2D
binError
in interface FloatIHistogram2D
indexX
- the x bin number (0...Nx-1) or OVERFLOW or UNDERFLOW.indexY
- the y bin number (0...Ny-1) or OVERFLOW or UNDERFLOW.public float binHeight(int indexX, int indexY)
FloatIHistogram2D
binHeight
in interface FloatIHistogram2D
indexX
- the x bin number (0...Nx-1) or OVERFLOW or UNDERFLOW.indexY
- the y bin number (0...Ny-1) or OVERFLOW or UNDERFLOW.public float equivalentBinEntries()
FloatIHistogram
equivalentBinEntries
in interface FloatIHistogram
public void fill(float x, float y)
FloatIHistogram2D
fill
in interface FloatIHistogram2D
public void fill(float x, float y, float weight)
FloatIHistogram2D
fill
in interface FloatIHistogram2D
public float meanX()
FloatIHistogram2D
meanX
in interface FloatIHistogram2D
public float meanY()
FloatIHistogram2D
meanY
in interface FloatIHistogram2D
public void reset()
FloatIHistogram
reset
in interface FloatIHistogram
public float rmsX()
FloatIHistogram2D
rmsX
in interface FloatIHistogram2D
public float rmsY()
FloatIHistogram2D
rmsY
in interface FloatIHistogram2D
public float sumAllBinHeights()
FloatIHistogram
sumAllBinHeights
in interface FloatIHistogram
public int binEntriesX(int indexX)
FloatIHistogram2D
binEntriesX
in interface FloatIHistogram2D
public int binEntriesY(int indexY)
FloatIHistogram2D
binEntriesY
in interface FloatIHistogram2D
public float binHeightX(int indexX)
FloatIHistogram2D
binHeightX
in interface FloatIHistogram2D
public float binHeightY(int indexY)
FloatIHistogram2D
binHeightY
in interface FloatIHistogram2D
public int dimensions()
FloatIHistogram
dimensions
in interface FloatIHistogram
public int entries()
FloatIHistogram
entries
in interface FloatIHistogram
public int extraEntries()
FloatIHistogram
extraEntries
in interface FloatIHistogram
public int[] minMaxBins()
FloatIHistogram2D
minMaxBins
in interface FloatIHistogram2D
public FloatIHistogram1D projectionX()
FloatIHistogram2D
projectionX
in interface FloatIHistogram2D
public FloatIHistogram1D projectionY()
FloatIHistogram2D
projectionY
in interface FloatIHistogram2D
public FloatIHistogram1D sliceX(int indexY)
FloatIHistogram2D
sliceX
in interface FloatIHistogram2D
public FloatIHistogram1D sliceX(int indexY1, int indexY2)
FloatIHistogram2D
sliceX
in interface FloatIHistogram2D
public FloatIHistogram1D sliceY(int indexX)
FloatIHistogram2D
sliceY
in interface FloatIHistogram2D
public FloatIHistogram1D sliceY(int indexX1, int indexX2)
FloatIHistogram2D
sliceY
in interface FloatIHistogram2D
public float sumBinHeights()
FloatIHistogram
sumBinHeights
in interface FloatIHistogram
public float sumExtraBinHeights()
FloatIHistogram
sumExtraBinHeights
in interface FloatIHistogram
public FloatIAxis xAxis()
FloatIHistogram2D
xAxis
in interface FloatIHistogram2D
public FloatIAxis yAxis()
FloatIHistogram2D
yAxis
in interface FloatIHistogram2D
public String title()
FloatIHistogram
title
in interface FloatIHistogram
|
Parallel Colt 0.9.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |