Java Array Min Value min(double[] a, double[] b)

Here you can find the source of min(double[] a, double[] b)

Description

min

License

Open Source License

Declaration

public static double[] min(double[] a, double[] b) 

Method Source Code

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

public class Main {
    public static double[] min(double[] a, double[] b) {
        if (a.length != b.length) {
            throw new IndexOutOfBoundsException("The length of two arrays must be equal");
        }//  ww  w.  ja v  a  2  s .  c o  m

        int n = a.length;
        double[] c = new double[n];
        for (int i = 0; i < n; i++) {
            c[i] = a[i] < b[i] ? a[i] : b[i];
        }

        return c;
    }
}

Related

  1. min(double... d)
  2. min(double... ds)
  3. min(double... nums)
  4. min(double... value)
  5. min(double[] a)
  6. min(double[] arr)
  7. min(double[] arr)
  8. min(double[] array)
  9. min(double[] array)