Java mean mean(double[] a)

Here you can find the source of mean(double[] a)

Description

mean

License

Open Source License

Declaration

public static double mean(double[] a) 

Method Source Code

//package com.java2s;

public class Main {
    public static double mean(double[] a) {
        return mean(a, 0, a.length);
    }/*from   w ww .j a  va 2  s . c om*/

    public static double mean(double[] a, int from, int to) {
        double mean = 0.0;
        for (int i = from; i < to; i++) {
            mean += a[i];
        }
        return mean / (to - from);
    }
}

Related

  1. mean(double ask, double bid)
  2. mean(Double totalValue, int numValues)
  3. mean(double v1, double v2)
  4. mean(double values[])
  5. mean(Double[] a)
  6. mean(double[] a)
  7. mean(double[] a)
  8. mean(double[] a, double[] b)
  9. mean(double[] a, double[] b)