Java Array Min Value arrayMin(double[] x)

Here you can find the source of arrayMin(double[] x)

Description

array Min

License

Open Source License

Declaration

public static double arrayMin(double[] x) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static double arrayMin(double[] x) {
        if (x.length == 0) {
            throw new IllegalArgumentException();
        }/*w w w.  ja  v  a 2 s . c om*/

        double result = x[0];

        for (int i = 1; i < x.length; i++) {
            if (result > x[i]) {
                result = x[i];
            }
        }

        return result;
    }
}

Related

  1. argmin(final double[] vec)
  2. argmin(int[] a)
  3. argMin(int[] a)
  4. arrayMin(double minVal, double[] vals)
  5. arrayMin(double[] arr)
  6. arrayMin(final double[] array)
  7. arrayMin(int[] property)
  8. findMin(float[] array)
  9. findMin(int[] workArray, int idx)