com.xj.anylogic.engine.analysis
Class HistogramSmartData

java.lang.Object
  extended by com.xj.anylogic.engine.internal.CSVDataProvider
      extended by com.xj.anylogic.engine.analysis.ChartItem
          extended by com.xj.anylogic.engine.analysis.HistogramData
              extended by com.xj.anylogic.engine.analysis.HistogramSmartData
All Implemented Interfaces:
java.io.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:
XJ Technologies Company Ltd. www.anylogic.com
See Also:
Serialized Form

Constructor Summary
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 updater)
          Constructs a smart histogram data object with the given number of intervals and initial interval width.
 
Method Summary
 void add(double val)
          Adds a sample data item to the histogram data object.
 double getIntervalWidth()
          Returns the current interval width, i.e. the data range corresponding to one interval.
 double getLowerBound()
          Returns the lower bound of the range covered by intervals.
 double getXMax()
          Returns the upper bound of the range covered by intervals.
 double getXMin()
          Returns the lower bound of the range covered by intervals.
 void reset()
          Fully resets the histogram data object: discards all PDF/CDF data and statistics; also restores the initial interval width.
 
Methods inherited from class com.xj.anylogic.engine.analysis.HistogramData
arePercentilesEnabled, count, destroyUpdater, deviation, getCDF, getMaxPDF, getNumberOfIntervals, getPDF, getPercentHigh, getPercentLow, getStatistics, isCDFEnabled, max, mean, meanConfidence, min, setCDFEnabled, setPercentilesEnabled, setPercents, toString, update
 
Methods inherited from class com.xj.anylogic.engine.analysis.ChartItem
getVersion
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 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 Detail

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.

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


Copyright © 1991-2008 XJ Technlogies. All Rights Reserved.