Java Mean Calculate computeMean(double[] results)

Here you can find the source of computeMean(double[] results)

Description

compute Mean

License

BSD License

Declaration

public static double computeMean(double[] results) 

Method Source Code

//package com.java2s;
/*//  w  w w.ja v a  2  s  .  c  o m
 * This file is part of an unofficial ISO20008-2.2 sample implementation to
 * evaluate certain schemes for their applicability on Android-based mobile
 * devices. The source is licensed under the modified 3-clause BSD license,
 * see the readme.
 * 
 * The code was published in conjunction with the publication called 
 * "Group Signatures on Mobile Devices: Practical Experiences" by
 * Potzmader, Winter, Hein, Hanser, Teufl and Chen
 */

public class Main {
    public static double computeMean(double[] results) {
        double mean = 0;
        for (double single : results) {
            mean += single;
        }
        return mean / results.length;
    }
}

Related

  1. computeMean(double[] data)
  2. computeMean(float[] array)
  3. computeMean(float[] data)
  4. computeMean(int val1, int val2, float ratio)
  5. computeMean(int[][] pixels)