List of utility methods to do Array Min Value
int | min(final int[] values) Finds the minimum value from a set of integers. int m = Integer.MAX_VALUE; for (int v : values) { if (v < m) { m = v; return m; |
long | min(final long[] array) min if (array == null || array.length == 0) throw new IllegalArgumentException(); long min = array[0]; for (int i = 1, j = array.length; i < j; i++) { if (min > array[i]) { min = array[i]; return min; |
Number | min(final Number... numbers) min double min = Double.MAX_VALUE; for (final Number n : numbers) { final double d = n.doubleValue(); min = Math.min(min, d); return min; |
T | min(final T... elements) min T min = elements[0]; for (final T element : elements) { if (0 > element.compareTo(min)) { min = element; return min; |
float | min(float a[][][]) Find minimum value in a 3D matrix 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; |
float | min(float... fs) min float ret = Float.MAX_VALUE; for (float f : fs) { ret = Math.min(ret, f); return ret; |
float | min(float... values) Returns the minimum value in the list of values. float result = values[0]; for (int i = 1; i < values.length; i++) result = Math.min(result, values[i]); return result; |
float | min(float... values) Replies the min value in the given values. float min = values[0]; for (int i = 1; i < values.length; ++i) { if (min > values[i]) { min = values[i]; return min; |
float | min(float[] array) min int i, size = array.length; float m = array[0]; for (i = 1; i < size; i++) m = Math.min(m, array[i]); return m; |
float[] | min(float[] array, float min) min for (int i = 0; i < array.length; i++) { array[i] = Math.min(array[i], min); return array; |