public class Histogram2DData extends ChartItem
Constructor and Description |
---|
Histogram2DData(int nXIntervals,
double xmin,
double xmax,
int nYIntervals,
double ymin,
double ymax,
double[] env)
Constructs a Histigram2DData with a given number of individual historgams each
having a given number of intervals, and sets x and y ranges.
|
Histogram2DData(int nXIntervals,
double xmin,
double xmax,
int nYIntervals,
double ymin,
double ymax,
double[] env,
DataUpdater_xjal updater)
Constructs a Histigram2DData with a given number of individual historgams each
having a given number of intervals, and sets x and y ranges.
|
Modifier and Type | Method and Description |
---|---|
void |
add(DataSet dataset)
Adds the whole contents of a given dataset to the histogram data,
updates PDF, CDF and count.
|
void |
add(double xval,
double yval)
Adds a sample data item to the histogram data, updates PDF, CDF and count.
|
int |
count(int xindex)
Returns the number of samples added to the histogram with xindex.
|
void |
destroyUpdater_xjal()
This method is used to 'disconnect' this data class from the
agent/experiment this object was defined in.
|
double |
getCDF(int xindex,
int yindex)
Returns the CDF (cumulative distribution function) at the END of the interval
yindex of the histogram with xindex.
|
int |
getNumberOfXIntervals()
Returns the number of base (x) intervals, i.e. the number of individual historgams.
|
int |
getNumberOfYIntervals()
Returns the number of data (y) intervals in each individual historgam.
|
double |
getPDF(int xindex,
int yindex)
Returns the PDF (probability distribution function) of the histogram with xindex
at the interval yindex.
|
double |
getPDFOutsideHigh(int xindex)
Returns the percent of samples (0..1) in the histogram xindex higher
than the specified maximum.
|
double |
getPDFOutsideLow(int xindex)
Returns the percent of samples (0..1) in the histogram xindex lower
than the specified data (y) minimum.
|
java.util.List<java.util.List<java.lang.Object>> |
getPlainDataTable() |
double |
getXMax()
Returns the maximum x (base) value.
|
double |
getXMin()
Returns the minimum x (base) value.
|
double |
getYMax()
Returns the maximum y (data) value.
|
double |
getYMin()
Returns the minimum y (data) value.
|
void |
reset()
Fully resets the histogram data: discards all PDF/CDF data and statistics.
|
void |
setEnvelopes(double[] env)
Sets the array of envelopes to calculate.
|
java.lang.String |
toString()
Returns a tab-separated multi-line textual representation of the histogram data.
|
void |
update()
Should be overridden and call add( xval, yval ) if the user has
specified the values to add.
|
getVersion
public Histogram2DData(int nXIntervals, double xmin, double xmax, int nYIntervals, double ymin, double ymax, double[] env)
nXIntervals
- the number of base (x) intervals, i.e. the number of individual historgamsxmin
- the minimum x valuexmax
- the maximum x valuenYIntervals
- the number of data intervals in each individual historgamymin
- the lower bound of the range covered by the histogram intervalsymax
- the upper bound of the range covered by the histogram intervalsenv
- the array of envelopes to calculate. For example, the array { 0.4, 0.6, 0.8 }
(this is the default array) means the histogram should calculate 40%, 60% and 80%
envelopes for each x interval. If null
, the default array is usedpublic Histogram2DData(int nXIntervals, double xmin, double xmax, int nYIntervals, double ymin, double ymax, double[] env, DataUpdater_xjal updater)
nXIntervals
- the number of base (x) intervals, i.e. the number of individual historgamsxmin
- the minimum x valuexmax
- the maximum x valuenYIntervals
- the number of data intervals in each individual historgamymin
- the lower bound of the range covered by the histogram intervalsymax
- the upper bound of the range covered by the histogram intervalsenv
- the array of envelopes to calculate. For example, the array { 0.4, 0.6, 0.8 }
(this is the default array) means the histogram should calculate 40%, 60% and 80%
envelopes for each x interval. If null
, the default array is usedupdater
- updater which may be used instead of overriding
update()
method@AnyLogicInternalCodegenAPI public void destroyUpdater_xjal()
public void reset()
public void add(double xval, double yval)
xval
- the base (x) value used to determine the target individual histogramyval
- the data (y) value that is added to the target individual histogrampublic void add(DataSet dataset)
dataset
- the dataset to add frompublic void update()
public void setEnvelopes(double[] env)
env
- the array of envelope values in ascending order, each within [0..1]public int getNumberOfXIntervals()
public int getNumberOfYIntervals()
public double getPDF(int xindex, int yindex)
xindex
- the index of the histogramyindex
- the index of the interval in the histogrampublic double getCDF(int xindex, int yindex)
xindex
- the index of the histogramyindex
- the index of the interval in the histogrampublic double getPDFOutsideLow(int xindex)
xindex
- the index of the histogrampublic double getPDFOutsideHigh(int xindex)
xindex
- the index of the histogrampublic int count(int xindex)
public double getXMin()
public double getXMax()
public double getYMin()
public double getYMax()
public java.lang.String toString()
toString
in class java.lang.Object
@AnyLogicInternalAPI public java.util.List<java.util.List<java.lang.Object>> getPlainDataTable()
Copyright © AnyLogic North America, LLC. All Rights Reserved.