<p>
Returns the absolute value of the element in the vector that has the smallest absolute value.<br>
<br>
Min{ |a<sub>i</sub>| } for all i<br>
</p>

@param a A matrix. Not modified.
@return The max element value of the vector.
979471
public static double elementMinAbs( DMatrix5 a ) {
        double min = Math.abs(a.a1);
        double tmp = Math.abs(a.a1); if( tmp < min ) min = tmp;
        tmp = Math.abs(a.a2); if( tmp < min ) min = tmp;
        tmp = Math.abs(a.a3); if( tmp < min ) min = tmp;
        tmp = Math.abs(a.a4); if( tmp < min ) min = tmp;
        tmp = Math.abs(a.a5); if( tmp < min ) min = tmp;

        return min;
    }
1175751
@SafeVarargs
    public static char min(final char... a) {
        N.checkArgNotNullOrEmpty(a, "The spcified array 'a' can not be null or empty");

        if (N.isNullOrEmpty(a)) {
            throw new IllegalArgumentException("The length of array can not be null or empty");
        }

        return min(a, 0, a.length);
    }
245323
public static int max(int[][] matrix) {
    int max = Integer.MIN_VALUE;
    for (int[] row : matrix) {
      for (int elem : row) {
        max = Math.max(max, elem);
      }
    }
    return max;
  }
952809
public static Short min(Short a, Short b) {
		return a <= b ? a : b;
	}
324384
public static double elementMax( DMatrix5 a ) {
        double max = a.a1;
        if( a.a2 > max ) max = a.a2;
        if( a.a3 > max ) max = a.a3;
        if( a.a4 > max ) max = a.a4;
        if( a.a5 > max ) max = a.a5;

        return max;
    }
584335
public static double elementMax( DMatrix4x4 a ) {
        double max = a.a11;
        if( a.a12 > max ) max = a.a12;
        if( a.a13 > max ) max = a.a13;
        if( a.a14 > max ) max = a.a14;
        if( a.a21 > max ) max = a.a21;
        if( a.a22 > max ) max = a.a22;
        if( a.a23 > max ) max = a.a23;
        if( a.a24 > max ) max = a.a24;
        if( a.a31 > max ) max = a.a31;
        if( a.a32 > max ) max = a.a32;
        if( a.a33 > max ) max = a.a33;
        if( a.a34 > max ) max = a.a34;
        if( a.a41 > max ) max = a.a41;
        if( a.a42 > max ) max = a.a42;
        if( a.a43 > max ) max = a.a43;
        if( a.a44 > max ) max = a.a44;

        return max;
    }
184235
public static double elementMin( DMatrix4 a ) {
        double min = a.a1;
        if( a.a2 < min ) min = a.a2;
        if( a.a3 < min ) min = a.a3;
        if( a.a4 < min ) min = a.a4;

        return min;
    }
666583
public static Double smallest(Iterator <Double> elements, int k) {
        if (k <= 0 || !elements.hasNext()) {
            return null;
        } 
        else if (k >= Integer.MAX_VALUE / 2) {
            List <Double> list = new ArrayList <> ();
            while (elements.hasNext()) {
                list.add(elements.next());
            }
            Collections.sort(list);
            return list.get(k - 1);
        }

        int bufferCap = k * 2;
        Double[] buffer = new Double[bufferCap];
        Double threshold = elements.next();
        buffer[0] = threshold;
        int bufferSize = 1;

        while (bufferSize < k && elements.hasNext()) {
            Double e = elements.next();
            buffer[bufferSize++] = e;
            threshold = Math.max(threshold, e);
        }

        while (elements.hasNext()) {
            Double e = elements.next();
            if (e >= threshold) {
                continue;
            }

            buffer[bufferSize++] = e;
            if (bufferSize == bufferCap) {

                int left = 0;
                int right = bufferCap - 1;

                int minThresholdPosition = 0;

                while (left < right) {
                    int pivotIndex = (left + right + 1) >>> 1;
                    
                    //--- partition
                    Double pivotValue = buffer[pivotIndex];

                    buffer[pivotIndex] = buffer[right];
                    buffer[right] = pivotValue;

                    int pivotNewIndex = left;
                    for (int l = left; l < right; l++) {
                        if (buffer[l] < pivotValue) {
                            Double temp = buffer[pivotNewIndex];
                            buffer[pivotNewIndex] = buffer[l];
                            buffer[l] = temp;
                            pivotNewIndex++;
                        }
                    }

                    Double temp = buffer[right];
                    buffer[right] = buffer[pivotNewIndex];
                    buffer[pivotNewIndex] = temp;
                    //---
        
                    if (pivotNewIndex > k) {
                        right = pivotNewIndex - 1;
                    } 
                    else if (pivotNewIndex < k) {
                        left = Math.max(pivotNewIndex, left + 1);
                        minThresholdPosition = pivotNewIndex;
                    } 
                    else {
                        break;
                    }
                }
                bufferSize = k;

                threshold = buffer[minThresholdPosition];
                for (int i = minThresholdPosition + 1; i < bufferSize; i++) {
                    threshold = Math.max(threshold, buffer[i]);
                }
            }
        }
        
        Arrays.sort(buffer, 0, bufferSize);

        k = Math.min(bufferSize, k);
        
        return buffer[k-1];
    }
1082666
private static int abs(int a) {
        if(a >= 0)
            return a;
        else if(a != Integer.MIN_VALUE)
            return -a;
        return Integer.MAX_VALUE;
    }
512370
public static double elementMinAbs( DMatrixSparseCSC A ) {
        if( A.nz_length == 0)
            return 0;

        double min = A.isFull() ? Math.abs(A.nz_values[0]) : 0;
        for(int i = 0; i < A.nz_length; i++ ) {
            double val = Math.abs(A.nz_values[i]);
            if( val < min ) {
                min = val;
            }
        }

        return min;
    }
569482
public static double elementMinAbs( DMatrix2 a ) {
        double min = Math.abs(a.a1);
        double tmp = Math.abs(a.a1); if( tmp < min ) min = tmp;
        tmp = Math.abs(a.a2); if( tmp < min ) min = tmp;

        return min;
    }
390538
public int getMinValueIndex(double[] array) {

        int index = 0;
        double min = Integer.MAX_VALUE;

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

        return index;
    }
382899
public static int min(int[][] matrix) {
    int min = Integer.MAX_VALUE;
    for (int[] row : matrix) {
      for (int elem : row) {
        min = Math.min(min, elem);
      }
    }
    return min;
  }
386575
public static double elementMin( DMatrix5x5 a ) {
        double min = a.a11;
        if( a.a12 < min ) min = a.a12;
        if( a.a13 < min ) min = a.a13;
        if( a.a14 < min ) min = a.a14;
        if( a.a15 < min ) min = a.a15;
        if( a.a21 < min ) min = a.a21;
        if( a.a22 < min ) min = a.a22;
        if( a.a23 < min ) min = a.a23;
        if( a.a24 < min ) min = a.a24;
        if( a.a25 < min ) min = a.a25;
        if( a.a31 < min ) min = a.a31;
        if( a.a32 < min ) min = a.a32;
        if( a.a33 < min ) min = a.a33;
        if( a.a34 < min ) min = a.a34;
        if( a.a35 < min ) min = a.a35;
        if( a.a41 < min ) min = a.a41;
        if( a.a42 < min ) min = a.a42;
        if( a.a43 < min ) min = a.a43;
        if( a.a44 < min ) min = a.a44;
        if( a.a45 < min ) min = a.a45;
        if( a.a51 < min ) min = a.a51;
        if( a.a52 < min ) min = a.a52;
        if( a.a53 < min ) min = a.a53;
        if( a.a54 < min ) min = a.a54;
        if( a.a55 < min ) min = a.a55;

        return min;
    }
1241208
function min(x) {
        var value;
        for (var i = 0; i < x.length; i++) {
            // On the first iteration of this loop, min is
            // undefined and is thus made the minimum element in the array
            if (x[i] < value || value === undefined) value = x[i];
        }
        return value;
    }
1134874
function() {
    var aabb = { min: new Vector(Number.MAX_VALUE, Number.MAX_VALUE, Number.MAX_VALUE) };
    aabb.max = aabb.min.negative();
    for (var i = 0; i < this.vertices.length; i++) {
      var v = Vector.fromArray(this.vertices[i]);
      aabb.min = Vector.min(aabb.min, v);
      aabb.max = Vector.max(aabb.max, v);
    }
    return aabb;
  }
1078142
public static double min(double[][] matrix) {
        double m = Double.POSITIVE_INFINITY;

        for (double[] x : matrix) {
            for (double y : x) {
                if (m > y) {
                    m = y;
                }
            }
        }

        return m;
    }