Java Array Min Value min(float a[][][])

Here you can find the source of min(float a[][][])

Description

Find minimum value in a 3D matrix

License

CeCILL license

Parameter

Parameter Description
a a parameter

Return

the minimum value in the matrix

Declaration

public static float min(float a[][][]) 

Method Source Code

//package com.java2s;
//License from project: CeCILL license 

public class Main {
    /**/* ww w.  j  a  va  2  s .c  o m*/
     * Find minimum value in a 3D matrix
     * 
     * @param a
     * @return the minimum value in the matrix
     */
    public static float min(float a[][][]) {
        float min = a[0][0][0];
        for (int i = 0; i < a.length; i++)
            for (int j = 0; j < a[i].length; j++)
                for (int k = 0; k < a[i][j].length; k++)
                    min = (a[i][j][k] < min ? a[i][j][k] : min);
        return min;
    }
}

Related

  1. min(final int[] values)
  2. min(final int[] values)
  3. min(final long[] array)
  4. min(final Number... numbers)
  5. min(final T... elements)
  6. min(float... fs)
  7. min(float... values)
  8. min(float... values)
  9. min(float[] array)