Java Array Min Value minIndex(double[] value)

Here you can find the source of minIndex(double[] value)

Description

returns the index of the smallest element from the given array

License

Open Source License

Declaration

public static double minIndex(double[] value) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /**/*w  w w .  j  a  v  a  2 s .  c  o m*/
     * returns the index of the smallest element from the given array
     */
    public static double minIndex(double[] value) {
        double result = Double.POSITIVE_INFINITY;
        int index = 0;
        for (int i = 0; i < value.length; i++) {
            if (value[i] < result)
                result = value[i];
            index = i;
        }
        return index;
    }
}

Related

  1. minIndex(double... data)
  2. minIndex(double[] a)
  3. minIndex(double[] arr)
  4. minIndex(double[] list)
  5. minIndex(double[] v)
  6. minIndex(double[] x, int length)
  7. minIndex(double[][] matrix, int column)
  8. minIndex(final double[] array)
  9. minIndex(final double[] values)