Java Array Sum sum(final float[] x)

Here you can find the source of sum(final float[] x)

Description

sum

License

Apache License

Declaration

public static float sum(final float[] x) 

Method Source Code

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

public class Main {
    public static float sum(final float[] x) {
        if (x == null) {
            throw new RuntimeException("diff function encountered null input");
        }/*from   ww w. j a  v a 2  s  .com*/

        float s = 0f;
        for (int i = 0; i < x.length; ++i)
            s += x[i];

        return s;
    }
}

Related

  1. sum(final double[] decay, final int factor)
  2. sum(final Double[] doubles)
  3. sum(final double[] productMix)
  4. sum(final double[] target)
  5. sum(final double[] vec)
  6. sum(final int base, final int[] ints)
  7. sum(final int[] terms, final int start, final int len)
  8. sum(final int[] values)
  9. sum(final int[] values, final int... indice)