public class Histogram extends AbstractHistogram implements Histogram1D
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
isHorizontal |
axisBins, data, nAxisBinsTAG_GAIN_RANGE, TAG_OVERSHOOT, TAG_UNDERSHOOT| Constructor and Description |
|---|
Histogram(String name,
double[] xBins)
Creates histogram with name and range [minX, maxX]
|
Histogram(String name,
double[] xBins,
boolean horizontal)
Creates histogram with name and range [minX, maxX]
|
Histogram(String name,
int nBins,
double minX,
double maxX)
Creates histogram with name and range [minX, maxX]
|
Histogram(String name,
int nBins,
double minX,
double maxX,
boolean horizontal)
Creates histogram with name and range [minX, maxX]
|
| Modifier and Type | Method and Description |
|---|---|
void |
addBinContent(int bin,
double w)
Increment bin content by a weight w.
|
int |
fill(double x,
double w)
Increment bin with abscissa X by with a weight w.
|
void |
fillN(double[] x,
double[] w,
int stepSize)
Fill this histogram with an array x and weights w.
|
int |
findBin(int dimIndex,
double x) |
double |
get(int dimIndex,
int index)
Gets the x value of the data point with the index i
|
List<String> |
getErrorList() |
int |
getIndex(int dimIndex,
double value)
Gets the index of the data point closest to the given x coordinate.
|
List<String> |
getInfoList() |
double |
getValue(int dimIndex,
double x)
Gets the interpolated y value of the data point for given x coordinate
|
List<String> |
getWarningList() |
void |
reset()
reset histogram content
|
addBinContent, findBin, findBin, findNextLargerIndex, getBinCenter, getBinContent, getDataCount, isEquiDistantaddDataLabel, addDataStyle, autoNotification, binarySearch, clearMetaInfo, equalDataLabels, equalEditConstraints, equalErrorValues, equalMetaData, equals, equals, equalValues, fireInvalidated, getAxisDescriptions, getDataLabel, getDataLabelMap, getDataStyleMap, getDimension, getEditConstraints, getMetaInfo, getName, getStyle, getThis, hashCode, lock, minNeigbourSearchX, recomputeLimits, removeDataLabel, removeStyle, setEditConstraints, setName, toString, updateEventListenergetStyle, setStyleclone, finalize, getClass, notify, notifyAll, wait, wait, waitfilladdBinContent, findBin, findBin, getBinCenter, getBinContent, isEquiDistantgetAxisDescription, getAxisDescriptions, getDataCount, getDataCount, getDataLabel, getDimension, getName, getStyle, getStyle, getValues, lock, recomputeLimits, setStyleaddListener, autoNotification, invokeListener, invokeListener, invokeListener, isAutoNotification, removeListener, updateEventListenergetMetaInfopublic Histogram(String name, double[] xBins)
name - of the data setsxBins - the initial bin array (defines [minX, maxX] and nBins)public Histogram(String name, double[] xBins, boolean horizontal)
name - of the data setsxBins - the initial bin array (defines [minX, maxX] and nBins)horizontal - whether binning is performed in Xpublic Histogram(String name, int nBins, double minX, double maxX)
name - of the data setsnBins - number of binsminX - minimum of rangemaxX - maximum of rangepublic Histogram(String name, int nBins, double minX, double maxX, boolean horizontal)
name - of the data setsnBins - number of binsminX - minimum of rangemaxX - maximum of rangehorizontal - whether binning is performed in Xpublic void addBinContent(int bin,
double w)
HistogramaddBinContent in interface HistogramaddBinContent in class AbstractHistogrambin - global bin IDw - weightpublic int fill(double x,
double w)
Histogram1Dfill in interface Histogram1Dx - new value to be addedw - weightpublic void fillN(double[] x,
double[] w,
int stepSize)
Histogram1DfillN in interface Histogram1Dx - x coordinates to be added.w - weights to be added.stepSize - step size through arrays x and wpublic int findBin(int dimIndex,
double x)
findBin in interface HistogramfindBin in class AbstractHistogramdimIndex - the dimension indexx - spatial real-valued coordinate for dimension dimIndexpublic double get(int dimIndex,
int index)
DataSetpublic List<String> getErrorList()
getErrorList in interface DataSetMetaDatagetErrorList in class AbstractDataSet<AbstractHistogram>public int getIndex(int dimIndex,
double value)
AbstractDataSetgetIndex in interface DataSetgetIndex in class AbstractDataSet<AbstractHistogram>dimIndex - the dimension indexvalue - the x position of the data point#public List<String> getInfoList()
getInfoList in interface DataSetMetaDatagetInfoList in class AbstractDataSet<AbstractHistogram>public double getValue(int dimIndex,
double x)
DataSetpublic List<String> getWarningList()
getWarningList in interface DataSetMetaDatagetWarningList in class AbstractDataSet<AbstractHistogram>public void reset()
Histogramreset in interface Histogramreset in class AbstractHistogramCopyright © 2019 GSI Helmholtzzentrum für Schwerionenforschung GmbH. All rights reserved.