uchicago.src.sim.analysis
Class OpenArrayData

java.lang.Object
  extended byuchicago.src.sim.analysis.OpenArrayData

public class OpenArrayData
extends java.lang.Object

A collection class used by the Statistic classes to hold their data. Implements the jclass.chart.Chartable interface in order that the data can be charted by a JClass chart. The data here is in tabular form (a Vector of Vectors) as x,y pairs. The first row holds the x values, while the next holds the y values that correspond to these x values. Any additional rows are additional y values that also correspond to the x values. Each x, y row pair is a series.

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

Field Summary
 java.lang.String[] ptLabels
           
 
Constructor Summary
OpenArrayData()
          Constructs this ArrayData object
 
Method Summary
 void addSeries(java.lang.String label)
          Adds a series with the specified name to the data table.
 void addX(double x)
          Adds an x value
 void addY(double y, int series)
          Adds a Y value to the specified series
 int getColSize()
          Gets the current column size.
 java.lang.Object getDataItem(int row, int col)
           
 java.lang.String getName()
           
 int getNumRows()
           
 java.lang.String[] getPointLabels()
           
 java.util.Vector getRow(int row)
           
 java.lang.String getSeriesLabel(int parm1)
           
 java.util.Vector getSeriesLabels()
          Gets the names (labels) of the series
 java.lang.String getSeriesName(int parm1)
           
 void setPointLabels(java.lang.String[] labels)
          Sets the point labels (labels for each x value)
 void setYValues(java.util.Vector yVals, int series)
          Sets a Vector of y values as a series
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ptLabels

public java.lang.String[] ptLabels
Constructor Detail

OpenArrayData

public OpenArrayData()
Constructs this ArrayData object

Method Detail

addX

public void addX(double x)
Adds an x value

Parameters:
x - the x value to add

addY

public void addY(double y,
                 int series)
Adds a Y value to the specified series

Parameters:
series - the series to add the y value to.

setYValues

public void setYValues(java.util.Vector yVals,
                       int series)
Sets a Vector of y values as a series

Parameters:
yVals - the y values to add
series - the series of these yVals

addSeries

public void addSeries(java.lang.String label)
Adds a series with the specified name to the data table.

Parameters:
label - the label for the series

setPointLabels

public void setPointLabels(java.lang.String[] labels)
Sets the point labels (labels for each x value)

Parameters:
labels - the labels to set

getSeriesLabels

public java.util.Vector getSeriesLabels()
Gets the names (labels) of the series

Returns:
the series names.

getColSize

public int getColSize()
Gets the current column size.


getDataItem

public java.lang.Object getDataItem(int row,
                                    int col)

getName

public java.lang.String getName()

getNumRows

public int getNumRows()

getPointLabels

public java.lang.String[] getPointLabels()

getRow

public java.util.Vector getRow(int row)

getSeriesLabel

public java.lang.String getSeriesLabel(int parm1)

getSeriesName

public java.lang.String getSeriesName(int parm1)