Here you can find the source of minLocation(double[] list)
Parameter | Description |
---|---|
list | a list of doubles |
public static int minLocation(double[] list)
//package com.java2s; //License from project: Open Source License public class Main { /**/*from www . ja va 2 s.com*/ * This method finds the location of the first minimum of list * @param list a list of doubles * @return the location of the first occurence of the minimum element */ public static int minLocation(double[] list) { int location = 0; for (int i = 1; i < list.length; ++i) if (list[i] < list[location]) location = i; return location; } }