|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.xj.anylogic.engine.internal.CSVDataProvider
com.xj.anylogic.engine.analysis.ChartItem
com.xj.anylogic.engine.analysis.Histogram2DData
public class Histogram2DData
Data (PDF, CDF, etc.) of an array of histograms, each having a certain range of base
(x) values and a range of data - y values. When an item (x,y) is added to
Histogram2DData, it first finds which individual histogram this item belongs
to (this depends on the x value) and then adds y value to that histigram.
The PDF and CDF are calculated for each individual histogram in the array.
In addition, Histogram2DData is capable of calculating envelopes - the areas
containing a given percent of data in each simple histogram.
Histogram2DData is particularly useful for analyzing a number of stochastic data sets,
e.g. a number of realizations of a stochastic process in time obtained in
different simulation runs.
| Constructor Summary | |
|---|---|
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 updater)
Constructs a Histigram2DData with a given number of individual historgams each having a given number of intervals, and sets x and y ranges. |
|
| Method Summary | |
|---|---|
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()
This method is used to 'disconnect' this data class from the active object/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. |
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. |
| 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 |
|---|
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 used
public Histogram2DData(int nXIntervals,
double xmin,
double xmax,
int nYIntervals,
double ymin,
double ymax,
double[] env,
DataUpdater 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| Method Detail |
|---|
public void destroyUpdater()
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()
update in class ChartItempublic 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 histogram
public double getCDF(int xindex,
int yindex)
xindex - the index of the histogramyindex - the index of the interval in the histogram
public double getPDFOutsideLow(int xindex)
xindex - the index of the histogram
public double getPDFOutsideHigh(int xindex)
xindex - the index of the histogram
public 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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||