Java Array Min Value minOfArray(float[] array)

Here you can find the source of minOfArray(float[] array)

Description

Returns the minimal value in a given array

License

Open Source License

Parameter

Parameter Description
array the array

Return

the minimal value

Declaration

public static float minOfArray(float[] array) 

Method Source Code

//package com.java2s;
/*//www . j a  v  a2  s . c o m
 * Copyright (C) 2010-2014  Andreas Maier
 * CONRAD is developed as an Open Source project under the GNU General Public License (GPL).
*/

public class Main {
    /**
     * Returns the minimal value in a given array
     * @param array the array
     * @return the minimal value
     */
    public static float minOfArray(float[] array) {
        float min = Float.MAX_VALUE;
        for (int i = 0; i < array.length; i++) {
            if (array[i] < min) {
                min = array[i];
            }

        }
        return min;
    }
}

Related

  1. minMaxOverArraySubset(double[] array, Iterable subset, boolean min)
  2. minNonNeg(int... vals)
  3. minNum(Number iArr[])
  4. minOf(double[] da, double val)
  5. minOfArr(int[] arrInput)
  6. minOfCol(int[][] matrixTable, int colBound)
  7. minOfSortedValues(double[] sortedValues)
  8. minOfSubRange(double[] xs, int start, int end)
  9. minOverArraySubset(double[] array, Iterable subset)