public abstract class AbstractHistogram extends AbstractDataSet3D<AbstractHistogram> implements Histogram
| Modifier and Type | Field and Description |
|---|---|
protected Map<Integer,String> |
dataLabels |
protected Map<Integer,String> |
dataStyles |
zRangeeditConstraints, errorList, infoList, lock, metaInfoMap, name, updateListeners, warningList, xRange, yRangeTAG_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.
|
String |
addDataLabel(int index,
String label)
adds a custom new data label for a point The label can be used as a
category name if CategoryStepsDefinition is used or for annotations
displayed for data points.
|
String |
addDataStyle(int index,
String style)
A string representation of the CSS style associated with this specific
DataSet data point. |
int |
findBin(double x) |
int |
findBin(double x,
double y) |
int |
findBin(double x,
double y,
double z) |
protected int |
findBinX(double x) |
protected int |
findBinY(double y) |
protected int |
findBinZ(double z) |
protected int |
findNextLargerIndex(double[] bin,
double value) |
double |
getBinCenterX(int binX) |
double |
getBinCenterY(int binY) |
double |
getBinCenterZ(int binZ) |
double |
getBinContent(int bin)
Return content of bin number bin.
|
String |
getDataLabel(int index)
Returns label of a data point specified by the index.
|
int |
getDimension() |
double |
getMaximum() |
double |
getMinimum() |
int |
getNBinsX() |
int |
getNBinsY() |
int |
getNBinsZ() |
String |
getStyle(int bin)
A string representation of the CSS style associated with this specific
DataSet data point. |
DataRange |
getValueRange() |
boolean |
isEquiDistant() |
String |
removeDataLabel(int index)
remove a custom data label for a point The label can be used as a
category name if CategoryStepsDefinition is used or for annotations
displayed for data points.
|
String |
removeStyle(int index)
A string representation of the CSS style associated with this specific
DataSet data point. |
void |
reset()
reset histogram content
|
void |
set(int xIndex,
int yIndex,
double x,
double y,
double z)
Changes a data point at specified index to new values.
|
computeLimits, getDataCount, getXIndex, getYIndex, getZRangebinarySearchX, binarySearchY, clearMetaInfo, fireInvalidated, getDataCount, getDataLabelMap, getDataStyleMap, getEditConstraints, getErrorList, getInfoList, getMetaInfo, getName, getThis, getUndefValue, getWarningList, getXMax, getXMin, getXRange, getYMax, getYMin, getYRange, isAutoNotification, lock, minNeigbourSearchX, setAutoNotifaction, setEditConstraints, setName, toString, unlock, updateEventListenergetStyle, setStyleclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetXDataCount, getYDataCount, getZ, getZRangegetDataCount, getDataCount, getName, getStyle, getUndefValue, getValue, getX, getXIndex, getXMax, getXMin, getXValues, getY, getYIndex, getYMax, getYMin, getYValues, isAutoNotification, lock, setAutoNotifaction, setStyle, unlockaddListener, invokeListener, invokeListener, removeListener, updateEventListenergetErrorList, getInfoList, getMetaInfo, getWarningListpublic 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 AbstractHistogram(String name, double[] xBins)
name - of the data setsxBins - the initial bin array (defines [minX, maxX] and nBins)public boolean isEquiDistant()
isEquiDistant in interface Histogrampublic DataRange getValueRange()
public String addDataStyle(int index, String style)
DataSet data point. @see #getStyle()addDataStyle in class AbstractDataSet<AbstractHistogram>index - the index of the specific data pointstyle - the CSS style for the given data binpublic String removeStyle(int index)
DataSet data point. @see #getStyle()removeStyle in class AbstractDataSet<AbstractHistogram>index - the index of the specific data pointpublic String getStyle(int bin)
DataSet data point. @see #getStyle()getStyle in interface DataSetgetStyle in class AbstractDataSet<AbstractHistogram>bin - the index of the specific data pointpublic String addDataLabel(int index, String label)
addDataLabel in class AbstractDataSet<AbstractHistogram>index - of the data pointlabel - for the data point specified by the indexnull if no label has
been specifiedpublic String removeDataLabel(int index)
removeDataLabel in class AbstractDataSet<AbstractHistogram>index - of the data pointnull if no label has
been specifiedpublic String getDataLabel(int index)
getDataLabel in interface DataSetgetDataLabel in class AbstractDataSet<AbstractHistogram>index - of the data labelnull if
no label has been specifiedpublic double getBinContent(int bin)
HistogramgetBinContent in interface Histogrambin - the indexpublic 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 double getMinimum()
getMinimum in interface Histogrampublic double getMaximum()
getMaximum in interface Histogramprotected int findNextLargerIndex(double[] bin,
double value)
public int findBin(double x)
protected int findBinX(double x)
protected int findBinY(double y)
protected int findBinZ(double z)
public int findBin(double x,
double y)
public int findBin(double x,
double y,
double z)
public double getBinCenterX(int binX)
getBinCenterX in interface HistogrambinX - indexpublic double getBinCenterY(int binY)
getBinCenterY in interface HistogrambinY - indexpublic double getBinCenterZ(int binZ)
getBinCenterZ in interface HistogrambinZ - indexpublic void reset()
Histogrampublic int getDimension()
getDimension in interface Histogrampublic int getNBinsX()
public int getNBinsY()
public int getNBinsZ()
public void set(int xIndex,
int yIndex,
double x,
double y,
double z)
DataSet3DCopyright © 2019 GSI Helmholtzzentrum für Schwerionenforschung GmbH. All rights reserved.