Returns an array of size 2 with min and max values of given double array
@param array
@return
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;
	}
909273
public static int max(IntArrayND array)
    {
        return array.stream().parallel().reduce(
            Integer.MIN_VALUE, Math::max);
    }
1073527
public static double max(double[][] values) {
    double max = 0;
    for (int i = 0; i < values.length; i++) {
      for (int j = 0; j < values[i].length; j++) {
        max = (values[i][j] > max) ? values[i][j] : max;
      }
    }
    return max;
  }
307871
public static long min(long... numberArray) {
		if (isEmpty(numberArray)) {
			throw new IllegalArgumentException("Number array must not empty !");
		}
		long min = numberArray[0];
		for (int i = 0; i < numberArray.length; i++) {
			if (min > numberArray[i]) {
				min = numberArray[i];
			}
		}
		return min;
	}
226911
@SuppressWarnings("unchecked")
    public static List<Double> getAt(double[] array, Range range) {
        return primitiveArrayGet(array, range);
    }
337642
public static double median(Array array) throws ExpressionException {

	int len = array.size();

	if (len == 0) return 0;

	if (array.getDimension() > 1) throw new ExpressionException("Median() can only be calculated for one dimensional arrays");

	double[] arr = new double[len];

	for (int i = 0; i < len; i++)
	    arr[i] = _toDoubleValue(array, i + 1);

	Arrays.sort(arr);

	double result = arr[len / 2];

	if (len % 2 == 0) {

	    return (result + arr[(len - 2) / 2]) / 2;
	}

	return result;
    }
136899
public static double[] toDouble(int[] array) {
        double[] n = new double[array.length];
        for (int i = 0; i < array.length; i++) {
            n[i] = (double) array[i];
        }
        return n;
    }
1285356
public static double max(final double[] values) {
		double max = NaN;
		if (values.length > 0) {
			max = values[0];

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

		return max;
	}
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;
  }
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;
    }
180818
public static float max( float []array , int offset , int length ) {
		float max = -Float.MAX_VALUE;
		for (int i = 0; i < length; i++) {
			float tmp = array[offset+i];
			if( tmp > max ) {
				max = tmp;
			}
		}
		return max;
	}
211586
static double min(double[] values) {
        double min = values[0];
        for (double value : values)
            if (value < min) min = value;
        return min;
    }
893560
public double[] getDoubleArray(final String key) {
		final String[] value = getArray(key);
		if (value != null) {
			final double[] result = new double[value.length];
			for (int i = 0; i < value.length; i++) {
				result[i] = Double.parseDouble(value[i]);
			}
			return result;
		}
		return null;
	}
1332953
public static int min(IntArrayND array)
    {
        return array.stream().parallel().reduce(
            Integer.MAX_VALUE, Math::min);
    }
743178
public static double[] rowMax(double[][] data) {
        double[] x = new double[data.length];

        for (int i = 0; i < x.length; i++) {
            x[i] = max(data[i]);
        }

        return x;
    }
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;
    }
1288791
public static double max(DoubleArrayND array)
    {
        return array.stream().parallel().reduce(
            Double.NEGATIVE_INFINITY, Math::max);
    }