uchicago.src.sim.analysis
Class PlotModel

java.lang.Object
  extended by uchicago.src.sim.analysis.PlotModel
Direct Known Subclasses:
OpenSeqStatistic

public abstract class PlotModel
extends java.lang.Object

Version:
$Revision $ $Date: 2004/11/03 19:51:00 $
Author:
Nick Collier

Field Summary
static int CSV
           
protected  int fileFormat
           
protected  java.lang.String fileName
           
protected  int lastColUpdate
           
protected  SimModel model
           
protected  java.lang.String title
           
 
Constructor Summary
PlotModel(SimModel model)
          Construct a Statistics class with the specified model
PlotModel(java.lang.String fileName, int fileFormat, java.lang.String title, SimModel model)
          Constructs a Statistic with the specified title, file name, and file format, and model.
 
Method Summary
 void addSequence(java.lang.String name)
           
 void addX(double xVal)
           
 void addY(double yVal, int yIndex)
           
 int getSequenceCount()
           
 java.util.ArrayList getSequenceNames()
           
 double getXVal(int xIndex)
           
 int getXValCount()
           
 double getYVal(int sequenceIndex, int index)
           
abstract  void record()
          Calculates the next item in the sequence
protected  void renameFile()
           
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

fileName

protected java.lang.String fileName

fileFormat

protected int fileFormat

title

protected java.lang.String title

model

protected SimModel model

lastColUpdate

protected int lastColUpdate
Constructor Detail

PlotModel

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


PlotModel

public PlotModel(java.lang.String fileName,
                 int fileFormat,
                 java.lang.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. PlotModel.CSV
title - the title
model - the model
Method Detail

addSequence

public void addSequence(java.lang.String name)

getSequenceNames

public java.util.ArrayList getSequenceNames()

addX

public void addX(double xVal)

addY

public void addY(double yVal,
                 int yIndex)

getXVal

public double getXVal(int xIndex)

getYVal

public double getYVal(int sequenceIndex,
                      int index)

getSequenceCount

public int getSequenceCount()

getXValCount

public int getXValCount()

record

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


renameFile

protected void renameFile()
                   throws java.io.IOException
Throws:
java.io.IOException

writeToFile

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