@Test public void testMeanEntries() { List<Entry> entries = new ArrayList<>(); for (int i = 1; i <= 10; i++) { entries.add(new Entry(i, i)); } assertEquals(5.5, Utils.mean(entries), 1e-12); }
public static double mean(double[] x) { double s = 0; for (double v: x) s += v; return s / x.length; }
Utils { public static double mean(double[] x) { double s = 0; for (double v: x) s += v; return s / x.length; } }
Utils { public static double mean(double[] x) { double s = 0; for (double v: x) s += v; return s / x.length; }  }
Utils { public static double mean(double[] x) { double s = 0; for (double v: x) s += v; return s / x.length; }  static double median(ArrayList<Double> arrList); static double mean(double[] x); static double[] interp(double[] x, double[] xp, double[] yp); static double stdev(double[] a); static double[] extract(int[] indicator, int value, double[] arr); static String array2string(double[] a, String format); static int argmax(double[] a); static int argmin(double[] a); static double findBestShift(double[] laserT, double[] touchT, double[] touchY); }
Utils { public static double mean(double[] x) { double s = 0; for (double v: x) s += v; return s / x.length; }  static double median(ArrayList<Double> arrList); static double mean(double[] x); static double[] interp(double[] x, double[] xp, double[] yp); static double stdev(double[] a); static double[] extract(int[] indicator, int value, double[] arr); static String array2string(double[] a, String format); static int argmax(double[] a); static int argmin(double[] a); static double findBestShift(double[] laserT, double[] touchT, double[] touchY);  }