RePast
v. 2.0

uchicago.src.sim.analysis
Class OpenStats

java.lang.Object
  |
  +--uchicago.src.sim.analysis.OpenStats
Direct Known Subclasses:
OpenHistogramStat

public abstract class OpenStats
extends Object

Statistics: base class for the statistics classes that form the model (MVC) for SimGraphs.


Field Summary
static int CSV
           
protected  OpenArrayData data
           
protected  int fileFormat
           
protected  String fileName
           
protected  int lastColUpdate
           
protected  long lastPrinted
           
protected  SimModel model
           
protected  String title
           
 
Constructor Summary
OpenStats(SimModel model)
          Construct a Statistics class with the specified model
OpenStats(String fileName, int fileFormat, String title, SimModel model)
          Constructs a Statistic with the specified title, file name, and file format, and model.
 
Method Summary
 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 writeToFile()
          Writes the data stored by this call to a file specified in the constructor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CSV

public static final int CSV
See Also:
Constant Field Values

data

protected OpenArrayData data

fileName

protected String fileName

fileFormat

protected int fileFormat

lastPrinted

protected long lastPrinted

title

protected String title

model

protected SimModel model

lastColUpdate

protected int lastColUpdate
Constructor Detail

OpenStats

public OpenStats(SimModel model)
Construct a Statistics class with the specified model


OpenStats

public OpenStats(String fileName,
                 int fileFormat,
                 String title,
                 SimModel model)
Constructs a Statistic with the specified title, file name, and file format, and model.

Parameters:
fileName - the name of the file to write the sequence data to
fileFormat - the format of the file - i.e. Statistics.CSV
title - the title
model - the model
Method Detail

record

public abstract void record()
Calculates the next item in the sequence


getDataTable

public Vector getDataTable()

renameFile

protected void renameFile()
                   throws IOException
IOException

writeToFile

public abstract void writeToFile()
Writes the data stored by this call to a file specified in the constructor.


setSimModel

public void setSimModel(SimModel model)
Sets the simulation model.


getDataItem

public Object getDataItem(int row,
                          int col)

getName

public String getName()

getNumRows

public int getNumRows()

getPointLabels

public String[] getPointLabels()

getRow

public Vector getRow(int row)

getSeriesLabel

public String getSeriesLabel(int parm1)

getSeriesName

public String getSeriesName(int parm1)

RePast
v. 2.0

Bug reports and feature requests to RePast