Java Array Sum sum(double[] dbs)

Here you can find the source of sum(double[] dbs)

Description

sum

License

Apache License

Declaration

public static double sum(double[] dbs) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {

    public static double sum(double[] dbs) {
        double value = 0;
        for (double d : dbs) {
            value += d;//from  ww  w  . j a  v  a  2  s.co  m
        }
        return value;
    }

    public static int sum(int[] dbs) {
        int value = 0;
        for (int d : dbs) {
            value += d;
        }
        return value;
    }

    public static double sum(double[][] w) {
        // TODO Auto-generated method stub
        double value = 0;
        for (double[] dbs : w) {
            value += sum(dbs);
        }
        return value;
    }
}

Related

  1. sum(double[] array)
  2. sum(double[] d)
  3. sum(double[] data)
  4. sum(double[] data)
  5. sum(double[] data, int i_, int n_)
  6. sum(double[] output, double[] a, double[] b)
  7. sum(double[] t)
  8. sum(double[] vec1, double[] vec2)
  9. sum(double[] vector)