Java List Average averageDouble(final List values)

Here you can find the source of averageDouble(final List values)

Description

average Double

License

Open Source License

Declaration

public static double averageDouble(final List<Double> values) 

Method Source Code


//package com.java2s;
import java.util.List;

public class Main {
    public static double averageDouble(final List<Double> values) {
        final double size = values.size();
        double avg = 0;

        for (final double v : values)
            avg += v / size;/*from w w w.j  a v  a 2 s  .com*/

        return avg;
    }
}

Related

  1. average(List arr)
  2. average(List list)
  3. average(List numbers)
  4. average(List observations)
  5. average(List collection)
  6. averageLog(List logList)
  7. averageValue(List oper)
  8. calculateAverage(final List durations)
  9. calculateAverage(List list)