|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsuramadu.util.stats.StatPack
Static helper class to compute various statistical values of collections and arrays.
Constructor Summary | |
StatPack()
|
Method Summary | |
static double[] |
diff(double[] doubleArray)
Given an array of doubles of length n, returns an array of length n-1 whos elements consist of the difference between each consecutive element of the specified array. |
static double[] |
diff(double[] doubleArray,
int offset)
|
static float[] |
diff(float[] floatArray)
Given an array of floats of length n, returns an array of length n-1 whos elements consist of the difference between each consecutive element of the specified array. |
static float[] |
diff(float[] floatArray,
int offset)
|
static int[] |
diff(int[] intArray)
Given an array of ints of length n, returns an array of length n-1 whos elements consist of the difference between each consecutive element of the specified array. |
static int[] |
diff(int[] intArray,
int offset)
|
static long[] |
diff(long[] longArray)
Given an array of longs of length n, returns an array of length n-1 whos elements consist of the difference between each consecutive element of the specified array. |
static long[] |
diff(long[] longArray,
int offset)
|
static double |
max(java.util.Collection c)
Calculate the statistical maximum of Collection of Numbers. |
static double |
max(double[] doubleArray)
Calculate the statistical maximum of an array of doubles. |
static double |
max(float[] floatArray)
Calculate the statistical maximum of an array of floats. |
static double |
max(int[] intArray)
Calculate the statistical maximum of an array of ints. |
static double |
max(long[] longArray)
Calculate the statistical maximum of an array of longs. |
static double |
mean(java.util.Collection c)
Calculate the statistical mean of Collection of Numbers. |
static double |
mean(double[] doubleArray)
Calculate the statistical mean of an array of doubles. |
static double |
mean(float[] floatArray)
Calculate the statistical mean of an array of floats. |
static double |
mean(int[] intArray)
Calculate the statistical mean of an array of ints. |
static double |
mean(long[] longArray)
Calculate the statistical mean of an array of longs. |
static double |
median(java.util.Collection c)
Calculate the statistical median of Collection of Numbers. |
static double |
median(double[] doubleArray)
Calculate the statistical median of an array of doubles. |
static double |
median(float[] floatArray)
Calculate the statistical median of an array of floats. |
static double |
median(int[] intArray)
Calculate the statistical median of an array of ints. |
static double |
median(long[] longArray)
Calculate the statistical median of an array of longs. |
static double |
min(java.util.Collection c)
Calculate the statistical minimum of Collection of Numbers. |
static double |
min(double[] doubleArray)
Calculate the statistical minimum of an array of doubles. |
static double |
min(float[] floatArray)
Calculate the statistical minimum of an array of floats. |
static double |
min(int[] intArray)
Calculate the statistical minimum of an array of ints. |
static double |
min(long[] longArray)
Calculate the statistical minimum of an array of longs. |
static Range |
mode(java.util.Collection c,
java.lang.Number numBins)
Calculate the statistical mode of a Collection of Numbers. |
static Range |
mode(double[] doubleArray)
Calculate the statistical mode of an array of doubles. |
static Range |
mode(double[] doubleArray,
double numBins)
Calculate the statistical mode of an array of doubles. |
static Range |
mode(float[] floatArray)
Calculate the statistical mode of an array of floats. |
static Range |
mode(float[] floatArray,
float numBins)
Calculate the statistical mode of an array of floats. |
static Range |
mode(int[] intArray)
Calculate the statistical mode of an array of ints. |
static Range |
mode(int[] intArray,
int numBins)
Calculate the statistical mode of an array of ints. |
static Range |
mode(long[] longArray)
Calculate the statistical mode of an array of longs. |
static Range |
mode(long[] longArray,
long numBins)
Calculate the statistical mode of an array of longs. |
static double |
stddev(java.util.Collection c)
Calculate the statistical standard deviation of Collection of Numbers. |
static double |
stddev(double[] doubleArray)
Calculate the statistical standard deviation of an array of doubles. |
static double |
stddev(float[] floatArray)
Calculate the statistical standard deviation of an array of floats. |
static double |
stddev(int[] intArray)
Calculate the statistical standard deviation of an array of ints. |
static double |
stddev(long[] longArray)
Calculate the statistical standard deviation of an array of longs. |
static java.util.Collection |
toCollection(double[] doubleArray)
Utility method for converting array of double to a Collection. |
static java.util.Collection |
toCollection(float[] floatArray)
Utility method for converting array of float to a Collection. |
static java.util.Collection |
toCollection(int[] intArray)
Utility method for converting array of int to a Collection. |
static java.util.Collection |
toCollection(long[] longArray)
Utility method for converting array of long to a Collection. |
static double[] |
toDoubleArray(java.util.Collection c)
Utility method for converting Collection Number objects to an array of doubles. |
static float[] |
toFloatArray(java.util.Collection c)
Utility method for converting Collection Number objects to an array of floats. |
static int[] |
toIntArray(java.util.Collection c)
Utility method for converting Collection Number objects to an array of ints. |
static long[] |
toLongArray(java.util.Collection c)
Utility method for converting Collection Number objects to an array of longs. |
static double |
variance(java.util.Collection c)
Calculate the statistical variance of Collection of Numbers. |
static double |
variance(double[] doubleArray)
Calculate the statistical variance of an array of doubles. |
static double |
variance(float[] floatArray)
Calculate the statistical variance of an array of floats. |
static double |
variance(int[] intArray)
Calculate the statistical variance of an array of ints. |
static double |
variance(long[] longArray)
Calculate the statistical variance of an array of longs. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StatPack()
Method Detail |
public static int[] diff(int[] intArray)
intArray
- array of ints to be differenced
Collection
public static int[] diff(int[] intArray, int offset)
public static long[] diff(long[] longArray)
longArray
- array of longs to be differenced
Collection
public static long[] diff(long[] longArray, int offset)
public static float[] diff(float[] floatArray)
floatArray
- array of floats to be differenced
Collection
public static float[] diff(float[] floatArray, int offset)
public static double[] diff(double[] doubleArray)
doubleArray
- array of doubles to be differenced
Collection
public static double[] diff(double[] doubleArray, int offset)
public static java.util.Collection toCollection(int[] intArray)
intArray
- an array of ints to be converted to a Collection
Collection
public static java.util.Collection toCollection(long[] longArray)
longArray
- an array of ints to be converted to a Collection
Collection
public static java.util.Collection toCollection(float[] floatArray)
floatArray
- an array of floats to be converted to a Collection
Collection
public static java.util.Collection toCollection(double[] doubleArray)
doubleArray
- an array of doubles to be converted to a Collection
Collection
public static int[] toIntArray(java.util.Collection c)
c
- a Collection of Number objects
Collection
public static long[] toLongArray(java.util.Collection c)
c
- a Collection of Number objects
Collection
public static float[] toFloatArray(java.util.Collection c)
c
- a Collection of Number objects
Collection
public static double[] toDoubleArray(java.util.Collection c)
c
- a Collection of Number objects
public static Range mode(int[] intArray)
intArray
- an array of ints to on which to calculate the statistical mode.
Range
public static Range mode(int[] intArray, int numBins)
intArray
- an array of ints to on which to calculate the statistical mode.numBins
- the number of bins to create for the Histogram to calculate the mode.
Range
public static Range mode(long[] longArray)
longArray
- an array of longs to on which to calculate the statistical mode.
Range
public static Range mode(long[] longArray, long numBins)
longArray
- an array of longs to on which to calculate the statistical mode.numBins
- the number of bins to create for the Histogram to calculate the mode.
Range
public static Range mode(float[] floatArray)
floatArray
- an array of floats to on which to calculate the statistical mode.
Range
public static Range mode(float[] floatArray, float numBins)
floatArray
- an array of floats to on which to calculate the statistical mode.numBins
- the number of bins to create for the Histogram to calculate the mode.
Range
public static Range mode(double[] doubleArray)
doubleArray
- an array of doubles to on which to calculate the statistical mode.
Range
public static Range mode(double[] doubleArray, double numBins)
doubleArray
- an array of doubles to on which to calculate the statistical mode.numBins
- the number of bins to create for the Histogram to calculate the mode.
Range
public static Range mode(java.util.Collection c, java.lang.Number numBins)
c
- a collection of Comparables on which to calculate the statistical mode.numBins
- the number of bins to create for the Histogram to calculate the mode.
Range
,
Collection
,
Comparable
,
Number
public static double variance(int[] intArray)
intArray
- an array of ints to on which to calculate the statistical mode.
public static double variance(long[] longArray)
longArray
- an array of longs to on which to calculate the statistical mode.
public static double variance(float[] floatArray)
floatArray
- an array of float to on which to calculate the statistical mode.
public static double variance(double[] doubleArray)
doubleArray
- an array of doubles to on which to calculate the statistical mode.
public static double variance(java.util.Collection c)
c
- a Collection of Number objects over which to calculate the statistical varience
Collection
,
Number
public static double stddev(int[] intArray)
intArray
- an array of ints to on which to calculate the statistical mode.
public static double stddev(long[] longArray)
longArray
- an array of longs to on which to calculate the statistical mode.
public static double stddev(float[] floatArray)
floatArray
- an array of float to on which to calculate the statistical mode.
public static double stddev(double[] doubleArray)
doubleArray
- an array of doubles to on which to calculate the statistical mode.
public static double stddev(java.util.Collection c)
c
- a Collection of Number objects over which to calculate the statistical varience
Collection
,
Number
public static double mean(int[] intArray)
intArray
- an array of ints to on which to calculate the statistical mode.
public static double mean(long[] longArray)
longArray
- an array of longs to on which to calculate the statistical mode.
public static double mean(float[] floatArray)
floatArray
- an array of float to on which to calculate the statistical mode.
public static double mean(double[] doubleArray)
doubleArray
- an array of doubles to on which to calculate the statistical mode.
public static double mean(java.util.Collection c)
c
- a Collection of Number objects over which to calculate the statistical varience
Collection
,
Number
public static double median(int[] intArray)
intArray
- an array of ints to on which to calculate the statistical mode.
public static double median(long[] longArray)
longArray
- an array of longs to on which to calculate the statistical mode.
public static double median(float[] floatArray)
floatArray
- an array of float to on which to calculate the statistical mode.
public static double median(double[] doubleArray)
doubleArray
- an array of doubles to on which to calculate the statistical mode.
public static double median(java.util.Collection c)
c
- a Collection of Number objects over which to calculate the statistical varience
Collection
,
Number
public static double min(int[] intArray)
intArray
- an array of ints to on which to calculate the statistical mode.
public static double min(long[] longArray)
longArray
- an array of longs to on which to calculate the statistical mode.
public static double min(float[] floatArray)
floatArray
- an array of float to on which to calculate the statistical mode.
public static double min(double[] doubleArray)
doubleArray
- an array of doubles to on which to calculate the statistical mode.
public static double min(java.util.Collection c)
c
- a Collection of Number objects over which to calculate the statistical varience
Collection
,
Number
public static double max(int[] intArray)
intArray
- an array of ints to on which to calculate the statistical mode.
public static double max(long[] longArray)
longArray
- an array of longs to on which to calculate the statistical mode.
public static double max(float[] floatArray)
floatArray
- an array of float to on which to calculate the statistical mode.
public static double max(double[] doubleArray)
doubleArray
- an array of doubles to on which to calculate the statistical mode.
public static double max(java.util.Collection c)
c
- a Collection of Number objects over which to calculate the statistical varience
Collection
,
Number
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |