Here you can find the source of minIndex(double[] arr)
public static int minIndex(double[] arr)
//package com.java2s; //License from project: Apache License public class Main { /**/*from w ww.j a va 2 s.c om*/ * return index of minimal number */ public static int minIndex(double[] arr) { if (arr.length <= 0) return -1; double min = Double.MAX_VALUE; int index = 0; for (int i = 0; i < arr.length; i++) { if (arr[i] < min) { min = arr[i]; index = i; } } return index; } }