ostore.archive
Class Stats

java.lang.Object
  |
  +--ostore.archive.Stats

public class Stats
extends Object

Stats keeps track of vital statistics used to measure performance of archive package.

Version:
$Id: Stats.java,v 1.3 2001/10/03 22:20:24 hweather Exp $
Author:
Hakim Weatherspoon

Field Summary
 long decodeTime
           
 long encodeTime
           
 long initTime
           
 long totalTime
           
 
Constructor Summary
Stats()
           
 
Method Summary
static boolean calcStats(int size, int[] data, double[] mean, double[] stddev, double[] confidence, double[] min, double[] max)
          Calculate the mean, stddev, and confidence interval for given data values.
static boolean calcStats(int size, long sum, long squareSum, double[] mean, double[] stddev, double[] confidence)
          Calculate the mean, stddev, and confidence interval for given data values.
static double getTVal(int degrees)
          getTVal Return the T-value for a given number of degrees of freedom (assuming a tail of .025...for 95% confidence intervals).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

encodeTime

public long encodeTime

decodeTime

public long decodeTime

initTime

public long initTime

totalTime

public long totalTime
Constructor Detail

Stats

public Stats()
Method Detail

getTVal

public static double getTVal(int degrees)
getTVal Return the T-value for a given number of degrees of freedom (assuming a tail of .025...for 95% confidence intervals).

Parameters:
degrees - == The number of degrees of freedom.
Returns:
return == the T-value for a given number of degrees of freedom.

calcStats

public static boolean calcStats(int size,
                                int[] data,
                                double[] mean,
                                double[] stddev,
                                double[] confidence,
                                double[] min,
                                double[] max)
Calculate the mean, stddev, and confidence interval for given data values.

Parameters:
size - == The number of parameters
data - == The data values
mean - == The mean (returned by reference)
stddev - == The standard deviation (returned by reference)

calcStats

public static boolean calcStats(int size,
                                long sum,
                                long squareSum,
                                double[] mean,
                                double[] stddev,
                                double[] confidence)
Calculate the mean, stddev, and confidence interval for given data values.

Parameters:
size - == The number of parameters.
sum - == The sum of the data values.
squareSum - == The sum of the squares of the data values.
mean - == The mean (returned by reference).
stddev - == The standard deviation (returned by reference).