|
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
Statistics: base class for the statistics classes that form the model (MVC) for SimGraphs.
| Field Summary | |
static int |
CSV
|
protected ArrayData |
data
|
protected int |
fileFormat
|
protected String |
fileName
|
protected int |
lastColUpdate
|
protected long |
lastPrinted
|
protected SimModel |
model
|
protected String |
title
|
| Fields inherited from interface jclass.chart.Chartable |
ARRAY, GENERAL |
| Constructor Summary | |
Statistics(SimModel model)
Construct a Statistics class with the specified model |
|
Statistics(String fileName,
int fileFormat,
String title,
SimModel model)
Constructs a Statistic with the specified title, file name, and file format, and model. |
|
| Method Summary | |
void |
addChartAsListener(SimGraph chart)
Adds the specified graph as a listener to this data |
int |
getDataInterpretation()
|
Object |
getDataItem(int row,
int col)
|
Vector |
getDataTable()
|
String |
getName()
|
int |
getNumRows()
|
String[] |
getPointLabels()
|
Vector |
getRow(int row)
|
String |
getSeriesLabel(int parm1)
|
String |
getSeriesName(int parm1)
|
abstract void |
record()
Calculates the next item in the sequence |
protected void |
renameFile()
|
void |
setSimModel(SimModel model)
Sets the simulation model. |
abstract void |
step()
Calculates the next item in the sequence and tells the chart to update itself. |
protected void |
updateGraph()
Updates the graph |
abstract void |
writeToFile()
Writes the data stored by this call to a file specified in the constructor. |
| 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 |
| Field Detail |
public static final int CSV
protected ArrayData data
protected String fileName
protected int fileFormat
protected long lastPrinted
protected String title
protected SimModel model
protected int lastColUpdate
| Constructor Detail |
public Statistics(SimModel model)
public Statistics(String fileName,
int fileFormat,
String title,
SimModel model)
fileName - the name of the file to write the sequence data tofileFormat - the format of the file - i.e. Statistics.CSVtitle - the titlemodel - the model| Method Detail |
public abstract void step()
protected void updateGraph()
public abstract void record()
public Vector getDataTable()
public void addChartAsListener(SimGraph chart)
addChartAsListener in interface Graphablechart - the listening graph
protected void renameFile()
throws IOException
IOExceptionpublic abstract void writeToFile()
public void setSimModel(SimModel model)
public int getDataInterpretation()
getDataInterpretation in interface jclass.chart.Chartable
public Object getDataItem(int row,
int col)
getDataItem in interface jclass.chart.Chartablepublic String getName()
getName in interface jclass.chart.Chartablepublic int getNumRows()
getNumRows in interface jclass.chart.Chartablepublic String[] getPointLabels()
getPointLabels in interface jclass.chart.Chartablepublic Vector getRow(int row)
getRow in interface jclass.chart.Chartablepublic String getSeriesLabel(int parm1)
getSeriesLabel in interface jclass.chart.Chartablepublic String getSeriesName(int parm1)
getSeriesName in interface jclass.chart.Chartable
|
RePast v. 2.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||