edu.uah.math.distributions
Class Data

java.lang.Object
  extended by edu.uah.math.distributions.Data
All Implemented Interfaces:
java.io.Serializable

public class Data
extends java.lang.Object
implements java.io.Serializable

This class models a simple implementation of a data distribution.

Version:
August, 2003
Author:
Kyle Siegrist, Dawn Duehring
See Also:
Serialized Form

Constructor Summary
Data()
          This default constructor creates a new data with the name "X".
Data(java.lang.String n)
          This general constructor creates a new data set with a prescribed name.
 
Method Summary
 double getMaxValue()
          This method gets the maximum value of the data set.
 double getMean()
          This method returns the mean.
 double getMinValue()
          This method gets the minimum value of the data set.
 java.lang.String getName()
          This method gets the name of the data set.
 double getOrderStatistic(int i)
          This method returns the i'th order statistic.
 double getPSD()
          This method gets the standard deviation of the data set treated as a population.
 double getPVariance()
          This method returns the variance of the data set treated as a population.
 double getSD()
          This method gets the sample standard deviation of the data set treated as a sample.
 int getSize()
          This method gets the number of points in the data set.
 double getValue()
          This method gets the current value of the data set.
 double getValue(int i)
          This method returns the value of the data set corresponding to a given index.
 double getVariance()
          This method gets the variance of the data set treated as a sample.
 void reset()
          This method resets the data set by removing all values.
 void setName(java.lang.String n)
          This method sets the name of the data set.
 void setValue(double x)
          This method adds a new number to the data set and re-compute the mean, mean square, minimum and maximum values, and order statistics.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Data

public Data(java.lang.String n)
This general constructor creates a new data set with a prescribed name.

Parameters:
n - the name

Data

public Data()
This default constructor creates a new data with the name "X".

Method Detail

setValue

public void setValue(double x)
This method adds a new number to the data set and re-compute the mean, mean square, minimum and maximum values, and order statistics.

Parameters:
x - the new value of the data set

getValue

public double getValue()
This method gets the current value of the data set.

Returns:
the current (last) value of the data set

getValue

public double getValue(int i)
This method returns the value of the data set corresponding to a given index.

Parameters:
i - the index
Returns:
the value corresponding to the index

getMean

public double getMean()
This method returns the mean.

Returns:
the mean

getPVariance

public double getPVariance()
This method returns the variance of the data set treated as a population.

Returns:
the variance

getPSD

public double getPSD()
This method gets the standard deviation of the data set treated as a population.

Returns:
the standard deviation

getVariance

public double getVariance()
This method gets the variance of the data set treated as a sample.

Returns:
the variance

getSD

public double getSD()
This method gets the sample standard deviation of the data set treated as a sample.

Returns:
the standard deviation

getOrderStatistic

public double getOrderStatistic(int i)
This method returns the i'th order statistic.

Parameters:
i - the index
Returns:
the order statistic of index i;

getMinValue

public double getMinValue()
This method gets the minimum value of the data set.

Returns:
the minimum value of the data set

getMaxValue

public double getMaxValue()
This method gets the maximum value of the data set.

Returns:
the maximum value of the data set.

reset

public void reset()
This method resets the data set by removing all values.


getSize

public int getSize()
This method gets the number of points in the data set.

Returns:
the size of the data set

setName

public void setName(java.lang.String n)
This method sets the name of the data set.

Parameters:
n - the name of the data set

getName

public java.lang.String getName()
This method gets the name of the data set. return the name of the data set