public abstract class AbstractHistogram extends AbstractDataSet<AbstractHistogram> implements Histogram
| Modifier and Type | Field and Description |
|---|---|
protected double[][] |
axisBins |
protected double[] |
data |
protected int[] |
nAxisBins |
TAG_GAIN_RANGE, TAG_OVERSHOOT, TAG_UNDERSHOOT| Constructor and Description |
|---|
AbstractHistogram(String name,
double[] xBins)
Creates histogram with name and range [minX, maxX]
|
AbstractHistogram(String name,
int nBins,
double minX,
double maxX)
Creates histogram with name and range [minX, maxX]
|
AbstractHistogram(String name,
int nBinsX,
double minX,
double maxX,
int nBinsY,
double minY,
double maxY)
Creates 2D histogram with name and ranges [minX, maxX] and [minY, maxY]
|
| Modifier and Type | Method and Description |
|---|---|
void |
addBinContent(int bin)
Increment bin content by 1.
|
void |
addBinContent(int bin,
double w)
Increment bin content by a weight w.
|
int |
findBin(double x,
double y) |
int |
findBin(double x,
double y,
double z) |
int |
findBin(int dimIndex,
double x) |
protected int |
findNextLargerIndex(double[] bin,
double value) |
double |
getBinCenter(int dimIndex,
int binIndex) |
double |
getBinContent(int bin)
Return content of bin number bin.
|
int |
getDataCount()
Get the number of data points in the data set.
|
int |
getDataCount(int dimIndex)
Get the number of data points in the data set for a specific dimension.
|
boolean |
isEquiDistant() |
void |
reset()
reset histogram content
|
addDataLabel, addDataStyle, autoNotification, binarySearch, clearMetaInfo, equalDataLabels, equalEditConstraints, equalErrorValues, equalMetaData, equals, equals, equalValues, fireInvalidated, getAxisDescriptions, getDataLabel, getDataLabelMap, getDataStyleMap, getDimension, getEditConstraints, getErrorList, getIndex, getInfoList, getMetaInfo, getName, getStyle, getThis, getWarningList, hashCode, lock, minNeigbourSearchX, recomputeLimits, removeDataLabel, removeStyle, setEditConstraints, setName, toString, updateEventListenergetStyle, setStyleclone, finalize, getClass, notify, notifyAll, wait, wait, waitget, getAxisDescription, getAxisDescriptions, getDataLabel, getDimension, getIndex, getName, getStyle, getStyle, getValue, getValues, lock, recomputeLimits, setStyleaddListener, autoNotification, invokeListener, invokeListener, invokeListener, isAutoNotification, removeListener, updateEventListenergetErrorList, getInfoList, getMetaInfo, getWarningListprotected final int[] nAxisBins
protected double[][] axisBins
protected final double[] data
public AbstractHistogram(String name, double[] xBins)
name - of the data setsxBins - the initial bin array (defines [minX, maxX] and nBins)public AbstractHistogram(String name, int nBins, double minX, double maxX)
name - of the data setsnBins - number of binsminX - minimum of rangemaxX - maximum of rangepublic AbstractHistogram(String name, int nBinsX, double minX, double maxX, int nBinsY, double minY, double maxY)
name - of the data setsnBinsX - number of horizontal binsminX - minimum of horizontal rangemaxX - maximum of horizontal rangenBinsY - number of vertical binsminY - minimum of vertical rangemaxY - maximum of vertical rangepublic void addBinContent(int bin)
HistogramaddBinContent in interface Histogrambin - global bin IDpublic void addBinContent(int bin,
double w)
HistogramaddBinContent in interface Histogrambin - global bin IDw - weightpublic int findBin(double x,
double y)
public int findBin(double x,
double y,
double z)
public int findBin(int dimIndex,
double x)
protected int findNextLargerIndex(double[] bin,
double value)
public double getBinCenter(int dimIndex,
int binIndex)
getBinCenter in interface HistogramdimIndex - the dimension indexbinIndex - indexpublic double getBinContent(int bin)
HistogramgetBinContent in interface Histogrambin - the indexpublic int getDataCount()
DataSetgetDataCount in interface DataSetpublic int getDataCount(int dimIndex)
DataSetgetDataCount in interface DataSetdimIndex - the dimension index (ie. '0' equals 'X', '1' equals 'Y')public boolean isEquiDistant()
isEquiDistant in interface HistogramCopyright © 2020 GSI Helmholtzzentrum für Schwerionenforschung GmbH. All rights reserved.