Here you can find the source of minIdx(int[] in)
public static final int minIdx(int[] in)
//package com.java2s; //License from project: Apache License public class Main { public static final int minIdx(int[] in) { int out = in[0]; for (int i = 1; i < in.length; i++) { if (in[i] < in[out]) { out = i;//from w w w. jav a 2s. c o m } } return out; } public static final int minIdx(double[] in) { int out = 0; for (int i = 1; i < in.length; i++) { if (in[i] < in[out]) { out = i; } } return out; } public static final int minIdx(float[] in) { int out = 0; for (int i = 1; i < in.length; i++) { if (in[i] < in[out]) { out = i; } } return out; } }