Here you can find the source of getMin(List
Parameter | Description |
---|---|
d | list |
public static double getMin(List<Double> d)
//package com.java2s; //License from project: Open Source License import java.util.List; public class Main { /**/*from w ww . j av a 2s .c o m*/ * Returns the maximum value of an Arraylist with doubles * * @param d * list * @return minima */ public static double getMin(List<Double> d) { double res = Double.MAX_VALUE; for (Double db : d) { if (db < res) res = db; } return res; } /** * Returns the maximum value of an Arraylist with doubles * * @param d * array * @return minima */ public static double getMin(double[] d) { double res = Double.MAX_VALUE; for (Double db : d) { if (db < res) res = db; } return res; } }