|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectibis.util.Stats
Class for doing some recurring statistical calculations.
Method Summary | |
static double |
mbs(double bytes,
double millis)
Calculates a speed in Mb/s given the size in bytes and the time in milliseconds. |
static double |
mbs(double bytes,
double[] millis,
int off,
int len)
Calculates a speed in Mb/s given the size in bytes and a number of times in milliseconds. |
static double |
mean(double[] data)
Calculates the mean of an array of numbers. |
static double |
mean(double[] data,
int off,
int len)
Calculates the mean of a subset of an array of numbers. |
static double |
round(double v)
Rounds up a double. |
static double |
stdDev(double[] data)
Calculates the standard deviation of an array of numbers. |
static double |
stdDev(double[] data,
int off,
int len)
Calculates the standard deviation of a subset of an array of numbers. |
static double |
stdDevError(double[] data,
int off,
int len)
Returns the standard deviation as a percentage of the mean. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static double mean(double[] data)
data
- the numbers to calculate the mean of.
public static double mean(double[] data, int off, int len)
data
- the numbers to calculate the mean ofoff
- offsetlen
- length
public static double stdDev(double[] data)
data
- the numbers to calculate the standard deviation of.
public static double stdDev(double[] data, int off, int len)
data
- the numbers to calculate the standard deviation ofoff
- offsetlen
- length
public static double mbs(double bytes, double millis)
bytes
- size of the data in bytesmillis
- the time of the measurement in milliseconds
public static double mbs(double bytes, double[] millis, int off, int len)
bytes
- size of the data in bytesmillis
- a number of time measurements in millisecondsoff
- the first measurement used in the calculationlen
- the number of measurements used in the calculation
public static double round(double v)
v
- the value to be rounded.
public static double stdDevError(double[] data, int off, int len)
data
- array with input data (numbers)off
- offset in the data at which to start calculatinglen
- number of array elements to use for the calculation
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |