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

longmaxValue(long[] array)
Returns the maximum value in the input array.
if (array.length == 0) {
    throw new NoSuchElementException("Empty array");
long maxValue = array[0];
for (int i = 1; i < array.length; i++) {
    if (array[i] > maxValue) {
        maxValue = array[i];
return maxValue;
bytemin(byte[] arr)
min
byte minValue = Byte.MAX_VALUE;
for (byte value : arr) {
    if (value < minValue) {
        minValue = value;
return minValue;
bytemin(byte[] array)

Returns the minimum symbol in an array.

if (array == null)
    throw new IllegalArgumentException("The ArrayEx must not be null");
else if (array.length == 0)
    throw new IllegalArgumentException("ArrayEx cannot be empty.");
byte min = array[0];
for (int i = 1; i < array.length; i++)
    if (array[i] < min)
        min = array[i];
...
bytemin(byte[] values)
Get the minimum value in an array subset
return min(values, 0, values.length);
doublemin(double values[], boolean[] mask)
Finds minimum value in the given vector .
double min = Double.POSITIVE_INFINITY;
int i = 0;
for (double value : values) {
    if (mask[i] && value < min) {
        min = value;
    i++;
return min;
doublemin(double values[], int size)
min
if (values == null || size == 0) {
    return Double.NaN;
double r = Double.POSITIVE_INFINITY;
for (int i = 0; i < size; i++) {
    double v = values[i];
    if (!Double.isNaN(v) && r > v) {
        r = v;
...
doublemin(double... a)
Computes the minimum value of a vararg of doubles.
if (a == null) {
    return 0;
if (a.length == 0) {
    return 0;
double min = Double.MAX_VALUE;
for (double d : a) {
...
doublemin(double... args)
min
double result = args[0];
for (int i = 1; i < args.length; i++)
    if (args[i] < result)
        result = args[i];
return result;
doublemin(double... d)
Min Value
double result = Double.MAX_VALUE;
for (double e : d) {
    result = Math.min(result, e);
return result;
doublemin(double... ds)
min
if (ds.length < 2) {
    throw new IllegalArgumentException("Input values cannot be fewer than 2");
double min_value = ds[0];
for (int i = 1; i < ds.length; i++) {
    if (ds[i] < min_value) {
        min_value = ds[i];
return min_value;