|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbodhidharma.utilities.Statistics
public class Statistics
A holder class for static methods relating to statistical and mathematical analysis.
Constructor Summary | |
---|---|
Statistics()
|
Method Summary | |
---|---|
static double |
calculateEuclideanDistance(double[] x,
double[] y)
Returns the Euclidian distance between x and y. |
static int |
generateRandomNumber(int max)
Returns a random integer from 0 to max - 1, based on the uniform distribution. |
static double |
getArraySum(double[] to_sum)
Returns the sum of the contents of all of the entries of the given array. |
static double |
getAverage(double[] data)
Returns the average of a set of doubles. |
static double |
getAverage(int[] data)
Returns the average of a set of ints. |
static int |
getIndexOfLargest(double[] values)
Returns the index of the entry of an array of doubles with the largest value. |
static int |
getIndexOfLargest(float[] values)
Returns the index of the entry of an array of floats with the largest value. |
static int |
getIndexOfLargest(int[] values)
Returns the index of the entry of an array of itegers with the largest value. |
static int |
getIndexOfSmallest(double[] values)
Returns the index of the entry of an array of doubles with the smallest value. |
static int[] |
getRandomOrdering(int number_entries)
Returns an array number_entries arrays. |
static double |
getStandardDeviation(double[] data)
Returns the standard deviation of a set of doubles. |
static double |
getStandardDeviation(int[] data)
Returns the standard deviation of a set of ints. |
static boolean |
isFactorOrMultiple(int x,
int y,
int[] z)
Returns whether or not x is either a factor or a multiple of y. |
static double[] |
normalize(double[] to_normalize)
Return a normalized copy of the the given array. |
static double[][] |
normalize(double[][] to_normalize)
Return a normalized copy of the the given array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Statistics()
Method Detail |
---|
public static double getAverage(double[] data)
data
- the which is to be averaged.
public static double getAverage(int[] data)
data
- the which is to be averaged.
public static double getStandardDeviation(double[] data)
data
- for which the standard deviation is to be found.
public static double getStandardDeviation(int[] data)
data
- for which the standard deviation is to be found.
public static boolean isFactorOrMultiple(int x, int y, int[] z)
public static int getIndexOfLargest(double[] values)
public static int getIndexOfSmallest(double[] values)
public static int getIndexOfLargest(float[] values)
public static int getIndexOfLargest(int[] values)
public static double calculateEuclideanDistance(double[] x, double[] y) throws java.lang.Exception
java.lang.Exception
public static int generateRandomNumber(int max)
public static int[] getRandomOrdering(int number_entries)
public static double getArraySum(double[] to_sum)
public static double[] normalize(double[] to_normalize)
public static double[][] normalize(double[][] to_normalize)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |