public class DoubleHistogram1D extends Object implements DoubleIHistogram1D
OVERFLOW, UNDERFLOW| Constructor and Description |
|---|
DoubleHistogram1D(String title,
double[] edges)
Creates a variable-width histogram.
|
DoubleHistogram1D(String title,
DoubleIAxis axis)
Creates a histogram with the given axis binning.
|
DoubleHistogram1D(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_2D(double[] data,
double[] weights,
int rows,
int columns,
int zero,
int rowStride,
int columnStride)
Fill histogram with specified data and weights.
|
void |
fill_2D(double[] data,
int rows,
int columns,
int zero,
int rowStride,
int columnStride)
Fill histogram with specified data and weight 1.
|
void |
fill(double x)
Fill histogram with weight 1.
|
void |
fill(double x,
double weight)
Fill histogram with specified weight.
|
DoubleHistogram1DContents |
getContents()
Returns the contents of this histogram.
|
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.
|
void |
setContents(DoubleHistogram1DContents contents)
Sets the contents of this histogram.
|
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).
|
DoubleIAxis |
xAxis()
Returns the X Axis.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitminMaxBins, xAxisdimensions, entries, extraEntries, sumAllBinHeights, sumBinHeights, sumExtraBinHeights, titlepublic DoubleHistogram1D(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 DoubleHistogram1D(String title, DoubleIAxis axis)
title - The histogram title.axis - The axis description to be used for binning.public DoubleHistogram1D(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()
DoubleIHistogramallEntries in interface DoubleIHistogrampublic int binEntries(int index)
DoubleIHistogram1DbinEntries in interface DoubleIHistogram1Dindex - the bin number (0...N-1) or OVERFLOW or UNDERFLOW.public double binError(int index)
DoubleIHistogram1DbinError in interface DoubleIHistogram1Dindex - the bin number (0...N-1) or OVERFLOW or UNDERFLOW.public double binHeight(int index)
DoubleIHistogram1DbinHeight in interface DoubleIHistogram1Dindex - the bin number (0...N-1) or OVERFLOW or UNDERFLOW.public double equivalentBinEntries()
DoubleIHistogramequivalentBinEntries in interface DoubleIHistogrampublic void fill(double x)
DoubleIHistogram1Dfill in interface DoubleIHistogram1Dpublic void fill(double x,
double weight)
DoubleIHistogram1Dfill in interface DoubleIHistogram1Dpublic void fill_2D(double[] data,
int rows,
int columns,
int zero,
int rowStride,
int columnStride)
DoubleIHistogram1Dfill_2D in interface DoubleIHistogram1Dpublic void fill_2D(double[] data,
double[] weights,
int rows,
int columns,
int zero,
int rowStride,
int columnStride)
DoubleIHistogram1Dfill_2D in interface DoubleIHistogram1Dpublic DoubleHistogram1DContents getContents()
public double mean()
DoubleIHistogram1Dmean in interface DoubleIHistogram1Dpublic void reset()
DoubleIHistogramreset in interface DoubleIHistogrampublic double rms()
DoubleIHistogram1Drms in interface DoubleIHistogram1Dpublic void setContents(DoubleHistogram1DContents contents)
contents - public int dimensions()
DoubleIHistogramdimensions in interface DoubleIHistogrampublic int entries()
DoubleIHistogramentries in interface DoubleIHistogrampublic int extraEntries()
DoubleIHistogramextraEntries in interface DoubleIHistogrampublic int[] minMaxBins()
DoubleIHistogram1DminMaxBins in interface DoubleIHistogram1Dpublic double sumAllBinHeights()
DoubleIHistogramsumAllBinHeights in interface DoubleIHistogrampublic double sumBinHeights()
DoubleIHistogramsumBinHeights in interface DoubleIHistogrampublic double sumExtraBinHeights()
DoubleIHistogramsumExtraBinHeights in interface DoubleIHistogrampublic DoubleIAxis xAxis()
DoubleIHistogram1DxAxis in interface DoubleIHistogram1Dpublic String title()
DoubleIHistogramtitle in interface DoubleIHistogramJump to the Parallel Colt Homepage