Selects the maximum value found in an array of items, so
min([2, 4, 6] as Object[]) == 6.

@param items an array of items
@return the maximum value
326216
public static <T> T max(T[] items) {
        return max((Iterable<T>)Arrays.asList(items));
    }
1262279
public static <T> T pick(List<T> values) {
		if (values == null || values.size() == 0)
			return null;

		int index = RandomInteger.nextInteger(values.size());
		return values.get(index);
	}
141844
public static <T> T max(Iterable<T> items) {
        T answer = null;
        for (T value : items) {
            if (value != null) {
                if (answer == null || ScriptBytecodeAdapter.compareGreaterThan(value, answer)) {
                    answer = value;
                }
            }
        }
        return answer;
    }
126433
public static double min(double[][] values) {
    double min = Double.MAX_VALUE;
    for (int i = 0; i < values.length; i++) {
      for (int j = 0; j < values[i].length; j++) {
        min = (values[i][j] < min) ? values[i][j] : min;
      }
    }
    return min;
  }
639888
public static long max(LongArrayND array)
    {
        return array.stream().parallel().reduce(
            Long.MIN_VALUE, Math::max);
    }
1346307
public float max(float... values) {
        float max = Float.MIN_VALUE;
        for (int i = 0; i < values.length; i++) {
            if (i == 0 || values[i] > max) {
                max = values[i];
            }
        }
        
        return max;
    }
909273
public static int max(IntArrayND array)
    {
        return array.stream().parallel().reduce(
            Integer.MIN_VALUE, Math::max);
    }
405582
public double max(double... values) {
        double max = Double.MIN_VALUE;
        for (int i = 0; i < values.length; i++) {
            if (i == 0 || values[i] > max) {
                max = values[i];
            }
        }
        
        return max;
    }
788088
public static long min(LongArrayND array)
    {
        return array.stream().parallel().reduce(
            Long.MAX_VALUE, Math::min);
    }
260794
public int minValue()
    {
        final int initialValue = this.initialValue;
        int min = size == 0 ? initialValue : Integer.MAX_VALUE;

        final int[] entries = this.entries;
        @DoNotSub final int length = entries.length;

        for (@DoNotSub int i = 1; i < length; i += 2)
        {
            final int value = entries[i];
            if (value != initialValue)
            {
                min = Math.min(min, value);
            }
        }

        return min;
    }
1149823
public static int[] range(int min, int max) {
    int[] range = new int[max - min];
    for (int i = 0; i < (max - min); i++) {
      range[i] = i + min;
    }
    return range;
  }
114951
public static double min(double... nums) {
    double min = nums[0];
    for (int i = 1; i < nums.length; i++) {
      if (nums[i] > min) {
        min = nums[i];
      }
    }
    return min;
  }
1060829
public static int min(int[] values)
    {
        int min = Integer.MAX_VALUE;

        for (int i = 0; i < values.length; ++i)
        {
            if (values[i] < min)
            {
                min = values[i];
            }
        }

        return min;
    }
554546
public Pair<T> min() {
        int minCount = Integer.MAX_VALUE;
        TLongIntIterator iter = counts.iterator();
        long minIndex = 0;

        while (!iter.hasNext()) {
            iter.advance();

            int count = iter.value();
            if (count < minCount) {
                minIndex = iter.key();
                minCount = count;
            }
        }
        if (minCount == Integer.MAX_VALUE)
            return null;
        
        int i = (int)(minIndex >>> 32);
        int j = (int)(minIndex & 0xfffffff);
        return new Pair<T>(elementIndices.lookup(i), 
                           elementIndices.lookup(j));
    }
163410
public double[] getMinMax(double[] array) {
		double[] minmax = new double[2];

		double max = Double.MIN_VALUE;
		double min = Double.MAX_VALUE;

		for(double value : array) {
			if(value > max) max = value;
			if(value < min) min = value;
		}

		minmax[0] = min;
		minmax[1] = max;
		return minmax;
	}
391447
public double min(double... values) {
        double min = Double.MAX_VALUE;
        for (int i = 0; i < values.length; i++) {
            if (i == 0 || values[i] < min) {
                min = values[i];
            }
        }
        
        return min;
    }
482258
public static <T extends Comparable<? super T>> T min(T[] numberArray) {
		if (isEmpty(numberArray)) {
			throw new IllegalArgumentException("Number array must not empty !");
		}
		T min = numberArray[0];
		for (int i = 0; i < numberArray.length; i++) {
			if (ObjectUtil.compare(min, numberArray[i]) > 0) {
				min = numberArray[i];
			}
		}
		return min;
	}