Java Array Min Value minIndex(float[] vals)

Here you can find the source of minIndex(float[] vals)

Description

min Index

License

Open Source License

Declaration

public static int minIndex(float[] vals) 

Method Source Code

//package com.java2s;

public class Main {
    public static int minIndex(float[] vals) {
        float min = Float.MAX_VALUE;
        int minI = -1;

        for (int i = 0; i < vals.length; i++)
            if (vals[i] < min) {
                minI = i;/*from   w  ww . j  a  va  2 s . co m*/
                min = vals[i];
            }

        return minI;
    }
}

Related

  1. minIndex(double[] x, int length)
  2. minIndex(double[][] matrix, int column)
  3. minIndex(final double[] array)
  4. minIndex(final double[] values)
  5. minIndex(float[] arr)
  6. minIndex(float[] xs)
  7. minIndex(int[] array)
  8. minIndex(int[] from)
  9. minIndex(int[] ints)