List of utility methods to do mean
float | mean(float[] a, int off, int length) mean return sum(a, off, length) / length;
|
float | mean(float[] arr) Find the mean of a single dimensional float array. if (arr.length == 0) { return 0; int count = 1; float mean = arr[0]; for (int i = 1; i < arr.length; i++) { count++; mean = mean + (arr[i] - mean) / count; ... |
float | mean(float[] array) mean return (float) mean(toDouble(array)); |
float | mean(float[] xs) mean if (xs == null || xs.length == 0) throw new IllegalArgumentException("Input to mean() is an empty array"); float sum = 0.0f; for (int i = 0; i < xs.length; ++i) sum += xs[i]; return sum / (float) xs.length; |
int | mean(int low, int high) Mean of two values. return low + ((high - low) / 2);
|
void | mean(int N, int D, double dat[][], double mu[]) mean for (int j = D - 1; j >= 0; j--) mu[j] = 0.0D; for (int n = N - 1; n >= 0; n--) { for (int j = D - 1; j >= 0; j--) mu[j] += dat[n][j]; for (int j = D - 1; j >= 0; j--) mu[j] /= N; ... |
double | mean(int... values) mean return sum(values) / values.length;
|
double | mean(int[] array) Computes the mean value of an array of integers. double sum = 0; for (int i = 0; i < array.length; i++) { sum += array[i]; double mean = sum / array.length; return mean; |
double | mean(int[] input) mean return sum(input) / (double) input.length; |
int | mean(int[] values) Returns the average of the values. int result = 0; for (int value : values) { result += value; result /= values.length; return result; |