Here you can find the source of minOverArraySubset(double[] array, Iterable
Parameter | Description |
---|---|
array | The array |
subset | The subset |
public static double minOverArraySubset(double[] array, Iterable<Integer> subset)
//package com.java2s; // it under the terms of the GNU General Public License as published by public class Main { /**/*from w w w .j av a 2 s . com*/ * Compute the minimum value over a subset of an array of doubles. * @param array The array * @param subset The subset */ public static double minOverArraySubset(double[] array, Iterable<Integer> subset) { double d; d = Double.POSITIVE_INFINITY; for (int j : subset) { if (array[j] < d) d = array[j]; } return d; } }