List of utility methods to do mean
double | mean(double[] nums) mean double s = 0; for (double n : nums) { s += n; return s / nums.length; |
double | mean(double[] samples) mean return mean(samples, 0, samples.length);
|
double | mean(double[] series) Computes the mean value of timeseries. double res = 0D; int count = 0; for (double tp : series) { if (Double.isNaN(tp) || Double.isInfinite(tp)) { } else { res += tp; count += 1; if (count > 0) { return res / ((Integer) count).doubleValue(); return Double.NaN; |
double | mean(double[] v) Computes the mean. if (v.length == 0) throw new IllegalArgumentException("Nothing to compute! The array must have at least one element."); return (mass(v) / (double) v.length); |
double | mean(double[] values) Computes the mean of the values in the given array. return sum(values) / values.length;
|
double | mean(double[] vector) Returns the mean of the vector. return sum(vector) / vector.length;
|
double | mean(double[] x, boolean[] used) mean int size = x.length; double sum = 0d; int n = 0; for (int i = 0; i < size; i++) { if (used[i]) { sum += x[i]; n++; return sum / (double) n; |
double | mean(double[][] image) mean return 0;
|
double | mean(double[][] input, int column) Compute the mean along the given column return sum(input, column) / (double) input.length; |
double | mean(double[][] matrix) Computes avarage value from all entries in the matrix double m = 0; for (int i = 0; i < matrix.length; i++) { for (int j = 0; j < matrix[0].length; j++) { m += matrix[i][j]; return m / (matrix.length * matrix[0].length); |