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