AnyLogic
Expand
Font size
All Implemented Interfaces:
Serializable

public class HistogramSmartData
extends HistogramData
Data of a histogram with a fixed number of intervals but auto-adjustable data range. The data range covered by the intervals always includes the full range of data samples added.
Author:
AnyLogic North America, LLC https://anylogic.com
See Also:
Serialized Form

Constructor Summary

ConstructorDescription
HistogramSmartData(int nIntervals, double initialIntervalWidth, boolean calcCDF, boolean calcPercentiles, double lowPercent, double highPercent)
Constructs a smart histogram data object with the given number of intervals and initial interval width.
HistogramSmartData(int nIntervals, double initialIntervalWidth, boolean calcCDF, boolean calcPercentiles, double lowPercent, double highPercent, DataUpdater_xjal updater)
Constructs a smart histogram data object with the given number of intervals and initial interval width.

Method Summary

Modifier and TypeMethodDescription
voidadd(double val)
Adds a sample data item to the histogram data object.
doublegetIntervalWidth()
Returns the current interval width, i.e.
doublegetLowerBound()
Returns the lower bound of the range covered by intervals.
doublegetXMax()
Returns the upper bound of the range covered by intervals.
doublegetXMin()
Returns the lower bound of the range covered by intervals.
voidreset()
Fully resets the histogram data object: discards all PDF/CDF data and statistics; also restores the initial interval width.

Methods inherited from class com.anylogic.engine.analysis.ChartItem

getVersion

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Details

HistogramSmartData

public HistogramSmartData(int nIntervals,
 double initialIntervalWidth,
 boolean calcCDF,
 boolean calcPercentiles,
 double lowPercent,
 double highPercent)
Constructs a smart histogram data object with the given number of intervals and initial interval width.
Parameters:
nIntervals - the number of intervals
initialIntervalWidth - the initial data range corresponding to one interval
calcCDF - if true, CDF is calculated
calcPercentiles - if true and calcCDF is true, percentiles are calculated
lowPercent - the low percent bound
highPercent - the high percent bound

HistogramSmartData

public HistogramSmartData(int nIntervals,
 double initialIntervalWidth,
 boolean calcCDF,
 boolean calcPercentiles,
 double lowPercent,
 double highPercent,
 DataUpdater_xjal updater)
Constructs a smart histogram data object with the given number of intervals and initial interval width.
Parameters:
nIntervals - the number of intervals
initialIntervalWidth - the initial data range corresponding to one interval
calcCDF - if true, CDF is calculated
calcPercentiles - if true and calcCDF is true, percentiles are calculated
lowPercent - the low percent bound
highPercent - the high percent bound
updater - updater which may be used instead of overriding HistogramData.update() method

Method Details

reset

public void reset()
Fully resets the histogram data object: discards all PDF/CDF data and statistics; also restores the initial interval width.
Overrides:
reset in class HistogramData

add

public void add(double val)
Adds a sample data item to the histogram data object.
Specified by:
add in class HistogramData
Parameters:
val - the sample value

getIntervalWidth

public double getIntervalWidth()
Returns the current interval width, i.e. the data range corresponding to one interval.
Overrides:
getIntervalWidth in class HistogramData
Returns:
the current interval width

getLowerBound

public double getLowerBound()
Returns the lower bound of the range covered by intervals. It is less or equal to the minimum of all data samples.
Returns:
the lower bound of the range covered by intervals

getXMin

public double getXMin()
Returns the lower bound of the range covered by intervals.
Specified by:
getXMin in class HistogramData
Returns:
the lower bound of the range covered by intervals

getXMax

public double getXMax()
Returns the upper bound of the range covered by intervals.
Specified by:
getXMax in class HistogramData
Returns:
the upper bound of the range covered by intervals