|
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||
java.lang.ObjectjAudioFeatureExtractor.GeneralTools.Statistics
public class Statistics
A holder class for static methods relating to statistical and mathematical analysis.
| コンストラクタの概要 | |
|---|---|
Statistics()
|
|
| メソッドの概要 | |
|---|---|
static double |
calculateEuclideanDistance(double[] x,
double[] y)
Returns the Euclidian distance between x and y. |
static int |
ensureIsPowerOfN(int x,
int n)
If the given x is a power of the given n, then x is returned. |
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 |
logBaseN(double x,
double n)
Returns the logarithm of the specified base of the given number. |
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. |
static int |
pow(int a,
int b)
Returns the given a raised to the power of the given b. |
| クラス java.lang.Object から継承されたメソッド |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| コンストラクタの詳細 |
|---|
public Statistics()
| メソッドの詳細 |
|---|
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.Exceptionpublic 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)
public static int pow(int a,
int b)
IMPORTANT: b must be greater than zero.
a - The base.b - The exponent.
public static double logBaseN(double x,
double n)
IMPORTANT: Both x and n must be greater than zero.
x - The value to find the log of.n - The base of the logarithm.
public static int ensureIsPowerOfN(int x,
int n)
IMPORTANT: Both x and n must be greater than zero.
x - The value to ensure is a power of n.n - The power to base x's validation on.
|
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | ||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | ||||||||