Java Utililty Methods Array Min Value

List of utility methods to do Array Min Value

Description

The list of methods to do Array Min Value are organized into topic(s).

Method

doublemin(final double[] target)
Returns the minimum of target.
return min(target, 0, target.length);
doublemin(final double[] vec)
Computes the minimum of the elements of a vector.
assert vec != null;
double min = vec[0];
for (double i : vec) {
    if (i < min) {
        min = i;
return min;
...
doublemin(final double[] vector)
min
if (vector.length == 0) {
    throw new RuntimeException("Input vector is empty.");
double min = vector[0];
for (final double value : vector) {
    if (min > value) {
        min = value;
return min;
voidmin(final float[] a, final float[] b)
Writes min(a,b) into a
for (int i = 0; i < a.length; ++i)
    if (b[i] < a[i])
        a[i] = b[i];
intmin(final int... array)
Find minimum out of Integer array
if (array == null) {
    return 0;
int min = array[0];
for (int i = 0; i < array.length; i++) {
    if (array[i] < min) {
        min = array[i];
return min;
intmin(final int... integers)
Returns minimum of the specified integer numbers.
int min = integers[0];
for (int i = 1; i < integers.length; i++) {
    min = Math.min(min, integers[i]);
return min;
intmin(final int... numbers)
min
if (numbers.length == 0) {
    throw new IllegalArgumentException("at least one parameter is required");
int min = numbers[0];
for (int i = 1; i < numbers.length; i++) {
    int number = numbers[i];
    if (number < min) {
        min = number;
...
intmin(final int... values)
min
int retVal = values[0];
for (int i = values.length; i-- != 1;) {
    retVal = values[i] < retVal ? values[i] : retVal;
return retVal;
intmin(final int[] arr)
Getter.
if (arr.length == 0)
    throw new IllegalArgumentException("must not be empty");
int min = Integer.MAX_VALUE;
for (final int v : arr) {
    if (v < min) {
        min = v;
return min;
intmin(final int[] values)
min
if (values.length == 0) {
    return -1;
int max = Integer.MAX_VALUE;
for (int v : values) {
    max = Math.min(v, max);
return max;
...