gov.sns.tools.statistics
Class ArrayStatistics

java.lang.Object
  |
  +--gov.sns.tools.statistics.ArrayStatistics

public class ArrayStatistics
extends java.lang.Object

Manage statistics on a multi-dimensional array.


Field Summary
protected  int[] dimensions
           
protected  java.lang.Object mean
           
protected  java.lang.Object meanSquare
           
protected  int population
           
 
Constructor Summary
ArrayStatistics(int dim)
          Convenience constructor for handling a one dimensional vector.
ArrayStatistics(int[] dim)
          Creates a new instance of ArrayStatistics
ArrayStatistics(int dim1, int dim2)
          Convenience constructor for handling a two dimensional Matrix.
 
Method Summary
 void addSample(java.lang.Object sample)
          Add a sample array to average into the population.
 java.lang.Object getMean()
          Get the mean array
 java.lang.Object sampleStandardDeviation()
          Sample standard deviation
 java.lang.Object sampleStandardDeviationOfMean()
          Sample standard deviation of the mean
 java.lang.Object sampleVariance()
          Sample variance
 java.lang.Object sampleVarianceOfMean()
          Sample variance of mean
 java.lang.Object standardDeviation()
          Standard deviation
 java.lang.Object standardDeviationOfMean()
          Standard deviation of the mean
 java.lang.Object variance()
          Get the variance array
 java.lang.Object varianceOfMean()
          Get the variance of the mean
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dimensions

protected int[] dimensions

population

protected int population

mean

protected java.lang.Object mean

meanSquare

protected java.lang.Object meanSquare
Constructor Detail

ArrayStatistics

public ArrayStatistics(int[] dim)
Creates a new instance of ArrayStatistics

Parameters:
dim - an array of sizes (one size for each dimension of the array)

ArrayStatistics

public ArrayStatistics(int dim)
Convenience constructor for handling a one dimensional vector.


ArrayStatistics

public ArrayStatistics(int dim1,
                       int dim2)
Convenience constructor for handling a two dimensional Matrix.

Method Detail

getMean

public java.lang.Object getMean()
Get the mean array


variance

public java.lang.Object variance()
Get the variance array


sampleVariance

public java.lang.Object sampleVariance()
Sample variance


varianceOfMean

public java.lang.Object varianceOfMean()
Get the variance of the mean


sampleVarianceOfMean

public java.lang.Object sampleVarianceOfMean()
Sample variance of mean


standardDeviation

public java.lang.Object standardDeviation()
Standard deviation


sampleStandardDeviation

public java.lang.Object sampleStandardDeviation()
Sample standard deviation


standardDeviationOfMean

public java.lang.Object standardDeviationOfMean()
Standard deviation of the mean


sampleStandardDeviationOfMean

public java.lang.Object sampleStandardDeviationOfMean()
Sample standard deviation of the mean


addSample

public void addSample(java.lang.Object sample)
Add a sample array to average into the population. The dimensions of the sample array must match the specified dimensions.