Here you can find the source of sumOfMinimum(double[] a, double[] b)
public static double sumOfMinimum(double[] a, double[] b)
//package com.java2s; //License from project: Open Source License public class Main { public static double sumOfMinimum(double[] a, double[] b) { if (a.length != b.length) { throw new IndexOutOfBoundsException("The length of two arrays must be equal"); }/*from ww w . j a va2s . c o m*/ double s = 0.0; for (int i = 0, n = a.length; i < n; i++) { s += a[i] < b[i] ? a[i] : b[i]; } return s; } }