data
Class DataSet

java.lang.Object
  extended by data.DataSet

public class DataSet
extends java.lang.Object

Title: DataSet Description: Version 2.0 DataSet is an object for containing data Copyright: Copyright (c) 2000, 2008 David N. Blauch

Company: Davidson College

Version:
2.0
Author:
David N. Blauch

Constructor Summary
DataSet()
           
 
Method Summary
 void addData(double[] xx, double[] yy)
          Adds an array of data points to the dataSet
 void addDatum(double xx, double yy)
          Adds a data point to the dataSet
 void clearData()
          Clears all of the data in the set
 double[][] getData()
          Gets all data in the set.
 double[] getDatum(int pt)
          Gets point pt in the data set
 int getNumberPoints()
          Gets the number of points in the data set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataSet

public DataSet()
Method Detail

addData

public void addData(double[] xx,
                    double[] yy)
Adds an array of data points to the dataSet


addDatum

public void addDatum(double xx,
                     double yy)
Adds a data point to the dataSet


clearData

public void clearData()
Clears all of the data in the set


getData

public double[][] getData()
Gets all data in the set. In the array that is returned, the i-th x value is in [0][i] and the i-th y value is in [1][i].

Returns:
two-dimensional array containing x,y values

getDatum

public double[] getDatum(int pt)
Gets point pt in the data set

Parameters:
pt - point number
Returns:
two-element array, element 0 is x value, element 1 is y value

getNumberPoints

public int getNumberPoints()
Gets the number of points in the data set