|
RePast v. 2.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--jclass.chart.ChartDataSupport
|
+--uchicago.src.sim.analysis.Statistics
|
+--uchicago.src.sim.analysis.HistogramStatistic
The Statistics class for histogram data. Operates as the backend for a Histogram, manipulating the HistogramItems. Can be created without a Histogram class to generate histogram data without displaying such.
Histogram,
HistogramItem,
Serialized Form| Field Summary |
| Fields inherited from class uchicago.src.sim.analysis.Statistics |
CSV, data, fileFormat, fileName, lastColUpdate, lastPrinted, model, title |
| Fields inherited from interface jclass.chart.Chartable |
ARRAY, GENERAL |
| Constructor Summary | |
HistogramStatistic(int numBins,
long lowerBound)
Constructs a HistogramStatistic with the specified number of bins and the specified lower bound. |
|
| Method Summary | |
void |
createHistogramItem(String name,
List list,
BinDataSource source)
Creates a HistogramItem with specified name, list and BinDataSource. |
void |
record()
Calculates a new histogram over the data supplied by a HistogramItem |
void |
setPointLabels(String[] labels)
Sets the histogram labels (the x - axis legend). |
void |
step()
Collects new statistics and updates the graph. |
protected void |
updateGraph()
Updates the graph |
void |
writeToFile()
Write the histogram data to a file. |
| Methods inherited from class uchicago.src.sim.analysis.Statistics |
addChartAsListener, getDataInterpretation, getDataItem, getDataTable, getName, getNumRows, getPointLabels, getRow, getSeriesLabel, getSeriesName, renameFile, setSimModel |
| Methods inherited from class jclass.chart.ChartDataSupport |
addChartDataListener, fireChartDataEvent, fireChartDataEvent, removeChartDataListener |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public HistogramStatistic(int numBins,
long lowerBound)
numBins - the number of binslowerBound - the lower bound| Method Detail |
public void createHistogramItem(String name,
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 step()
step in class Statisticspublic void record()
record in class Statisticsprotected void updateGraph()
Statistics
updateGraph in class Statisticspublic void setPointLabels(String[] labels)
public void writeToFile()
writeToFile in class Statistics
|
RePast v. 2.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||