List of utility methods to do Array Max Value
byte[] | max(byte[] lArray, byte[] rArray) max int cmp = compare(lArray, 0, lArray.length, rArray, 0, rArray.length); if (cmp >= 0) { return lArray; } else { return rArray; |
byte | max(byte[] values) Get the maximum value in an array subset return max(values, 0, values.length);
|
D | max(D... comparables) Returns the maximum value. D max = null; for (int i = 0; i < comparables.length; i++) { D element = comparables[i]; if (element != null) { if (max == null || max.compareTo(element) < 0) { max = element; return max; |
double | max(double array[], int start, int length) max double max = array[start]; final int end = start + length; for (int i = start + 1; i < end; i++) { double v = array[i]; if (v > max) { max = v; return max; |
double | max(double values[]) Finds maximum value in the given vector. double max = Double.NEGATIVE_INFINITY; for (double value : values) { if (value > max) max = value; return max; |
double | max(double values[], int size) max if (values == null || size == 0) { return Double.NaN; double r = Double.NEGATIVE_INFINITY; for (int i = 0; i < size; i++) { double v = values[i]; if (!Double.isNaN(v) && r < v) { r = v; ... |
double | max(double... a) Computes the maximum value of a vararg of doubles. if (a == null) { return 0; if (a.length == 0) { return 0; double max = Double.MIN_VALUE; for (double d : a) { ... |
double | max(double... arr) max double max = Double.MIN_VALUE; for (double d : arr) if (d > max) max = d; return max; |
double | max(double... ds) max if (ds.length < 2) { throw new IllegalArgumentException("Input values cannot be fewer than 2"); double max_value = ds[0]; for (int i = 1; i < ds.length; i++) { if (ds[i] > max_value) { max_value = ds[i]; return max_value; |
double | max(double... ds) max double maxv = ds[0]; for (int i = 1; i < ds.length; i++) { maxv = Math.max(ds[i], maxv); return maxv; |