|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuchicago.src.sim.analysis.plot.OpenGraph
uchicago.src.sim.analysis.OpenHistogram
public class OpenHistogram
A dynamic bar chart. The OpenHistogram class allows the user to histogram data generated by a collection of objects. The histogram range, as displayed, is [lowerBound, maxValue] where the maxValue is calculated each time the graph is stepped. The individual bin ranges except for the final bin are [Math.floor(value), Math.ceil(value + interval)) where interval is calculated by (maxValue - lowerBound) / numBins. The final bin is inclusive.
HistogramStatistic,
HistogramItem| Field Summary |
|---|
| Fields inherited from class uchicago.src.sim.analysis.plot.OpenGraph |
|---|
CIRCLE, CROSS, DIAMOND, fileName, FILLED_CIRCLE, FILLED_DIAMOND, FILLED_SQUARE, FILLED_TRIANGLE, frame, HISTOGRAM, inNormalState, location, model, movieMaker, plot, PLUS_SIGN, SEQUENCE, SQUARE, title, TRIANGLE, xIncr, xMax, xMin, yIncr, yMax, yMin |
| Fields inherited from interface uchicago.src.sim.gui.MediaProducer |
|---|
MPEG, QUICK_TIME |
| Constructor Summary | |
|---|---|
OpenHistogram(java.lang.String title,
int numBins,
long lowerBound)
Constructs an OpenHistogram with the specified title, the specified number of bins, and the specified lowerBound. |
|
OpenHistogram(java.lang.String title,
int numBins,
long lowerBound,
SimModel model)
Constructs an OpenHistogram with the specified title, the specified number of bins, and the specified lowerBound. |
|
| Method Summary | |
|---|---|
void |
createHistogramItem(java.lang.String name,
java.util.List list,
BinDataSource source)
Creates a HistogramItem with specified name, list and BinDataSource to be displayed by this Histogram. |
void |
createHistogramItem(java.lang.String name,
java.util.List list,
BinDataSource source,
int maxIntegerDigits,
int maxFractionDigits)
Creates a HistogramItem with specified name, list and BinDataSource to be displayed by this Histogram. |
void |
createHistogramItem(java.lang.String name,
java.util.List list,
java.lang.Object target,
java.lang.String methodName)
Creates a HistogramItem with specified name to be displayed by this OpenHistogram. |
void |
createHistogramItem(java.lang.String name,
java.util.List list,
java.lang.Object target,
java.lang.String methodName,
int maxIntegerDigits,
int maxFractionDigits)
Creates a HistogramItem with specified name to be displayed by this OpenHistogram. |
void |
createHistogramItem(java.lang.String name,
java.util.List list,
java.lang.String listObjMethodName)
Creates a HistogramItem to be displayed by this OpenHistogram. |
void |
createHistogramItem(java.lang.String name,
java.util.List list,
java.lang.String listObjMethodName,
int maxIntegerDigits,
int maxFractionDigits)
Creates a HistogramItem to be displayed by this OpenHistogram. |
void |
record()
Records data from the HistogramItems without updating the display |
void |
step()
Records any new data and updates the displayed graph. |
void |
updateGraph()
Updates the graph. |
| Methods inherited from class uchicago.src.sim.analysis.plot.OpenGraph |
|---|
addMovieFrame, closeMovie, createBinDataSource, createListBinDataSource, createSequence, display, dispose, getAxisTitles, getSize, getTitle, getXIncrement, getXRange, getYIncrement, getYRange, setAxisTitles, setBars, setLocation, setMovieName, setSize, setSnapshotFileName, setXIncrement, setXRange, setXTick, setYIncrement, setYRange, takeSnapshot, updateXTick, zoom |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OpenHistogram(java.lang.String title,
int numBins,
long lowerBound)
title - the title of the histogramnumBins - the number of binslowerBound - the lower bound of the histogram
public OpenHistogram(java.lang.String title,
int numBins,
long lowerBound,
SimModel model)
title - the title of the histogramnumBins - the number of binslowerBound - the lower bound of the histogrammodel - the model associated with this graph| Method Detail |
|---|
public void createHistogramItem(java.lang.String name,
java.util.List list,
BinDataSource source)
Note: This creates a Histogram that updates faster than those created with createHistogramItem(String name, List list, String methodName). Consequently, it should be preferred over the other method.
name - the name of the itemlist - the list of objects that provided the data for the itemsource - the BinDataSource used to get the data from the objects
in the list.
public void createHistogramItem(java.lang.String name,
java.util.List list,
java.lang.Object target,
java.lang.String methodName)
name - the name of the itemlist - the list of objects that provided the data for the itemtarget - the target of the name methodmethodName - the name of the method to call and pass each object
in the list to
public void createHistogramItem(java.lang.String name,
java.util.List list,
java.lang.Object target,
java.lang.String methodName,
int maxIntegerDigits,
int maxFractionDigits)
name - the name of the itemlist - the list of objects that provided the data for the itemtarget - the target of the name methodmethodName - the name of the method to call and pass each object
in the list tomaxIntegerDigits - the maximum number of digits before the
decimal point in the bin labels. A value of -1 will record all the digits.maxFractionDigits - the maximum number of digits after the
decimal point in the bin labels. A value of -1 will record all the digits.
public void createHistogramItem(java.lang.String name,
java.util.List list,
BinDataSource source,
int maxIntegerDigits,
int maxFractionDigits)
name - the name of the itemlist - the list of objects that provided the data for the itemsource - the BinDataSource used to get the data from the objects
in the list.maxIntegerDigits - the maximum number of digits before the
decimal point in the bin labels. A value of -1 will record all the digits.maxFractionDigits - the maximum number of digits after the
decimal point in the bin labels. A value of -1 will record all the digits.
public void createHistogramItem(java.lang.String name,
java.util.List list,
java.lang.String listObjMethodName)
Note: This creates a Histogram that updates more slowly than that created with createHistogramItem(String name, List list, BinDataSource source). Consequently, this method should not be used unless the Histogram will be updated infrequently.
name - the name of this itemlist - the list of object on which the specified method is calledlistObjMethodName - the name of the method to call on the objects. Should
return a Number value.HistogramItem
public void createHistogramItem(java.lang.String name,
java.util.List list,
java.lang.String listObjMethodName,
int maxIntegerDigits,
int maxFractionDigits)
Note: This creates a Histogram that updates more slowly than that created with createHistogramItem(String name, List list, BinDataSource source). Consequently, this method should not be used unless the Histogram will be updated infrequently.
name - the name of this itemlist - the list of object on which the specified method is calledlistObjMethodName - the name of the method to call on the objects. Should
return a Number value.maxIntegerDigits - the maximum number of digits before the
decimal point in the bin labels. A value of -1 will record all the digits.maxFractionDigits - the maximum number of digits after the
decimal point in the bin labels. A value of -1 will record all the digits.HistogramItempublic void record()
record in class OpenGraphpublic void step()
step in class OpenGraphpublic void updateGraph()
updateGraph in class OpenGraph
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||