<p>
Returns the value of the element in the vector that has the largest value.<br>
<br>
Max{ a<sub>i</sub> } for all i<br>
</p>

@param a A vector. Not modified.
@return The max element value of the matrix.
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;
    }
663776
public static double elementMax( DMatrix2x2 a ) {
        double max = a.a11;
        if( a.a12 > max ) max = a.a12;
        if( a.a21 > max ) max = a.a21;
        if( a.a22 > max ) max = a.a22;

        return max;
    }
17465
public static char max(final char a, final char b, final char c) {
        final char m = (a >= b) ? a : b;

        return (m >= c) ? m : c;
    }
105594
public static double elementMaxAbs( DMatrix2 a ) {
        double max = Math.abs(a.a1);
        double tmp = Math.abs(a.a2); if( tmp > max ) max = tmp;
        tmp = Math.abs(a.a2); if( tmp > max ) max = tmp;

        return max;
    }
168586
public static double elementMax( DMatrix3 a ) {
        double max = a.a1;
        if( a.a2 > max ) max = a.a2;
        if( a.a3 > max ) max = a.a3;

        return max;
    }
1037582
public static function maxFromArray($a)
    {
        $max = $a[0];

        for ($i = 1; $i < count($a); $i++) {
            if($max < $a[$i])
                $max = $a[$i];
        }

        return $max;
    }
916249
public static double[] getMax(SpatialComparable box) {
    final int dim = box.getDimensionality();
    double[] max = new double[dim];
    for(int i = 0; i < dim; i++) {
      max[i] = box.getMax(i);
    }
    return max;
  }
305402
public static float max(final float a, final float b) {
        if (Float.isNaN(a)) {
            return b;
        } else if (Float.isNaN(b)) {
            return a;
        } else {
            return Math.max(a, b);
        }
    }
187128
public static double norm_inf(double[] a) {
    double max = Double.NEGATIVE_INFINITY;
    for (double d : a) {
      if (Math.abs(d) > max) {
        max = Math.abs(d);
      }
    }
    return max;
  }
1356992
public static long searchMax(long[] longArray) {
        if(longArray.length == 0) {
            throw new IllegalArgumentException("The array you provided does not have any elements");
        }

        long max = longArray[0];

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

        return max;
    }
933955
public static double norm_inf(float[] a) {
    double max = Double.NEGATIVE_INFINITY;
    for (int i = 0; i < a.length; i++) {
      if (Math.abs(a[i]) > max) {
        max = Math.abs(a[i]);
      }
    }
    return max;
  }
338647
public static double elementMin( DMatrixD1 a ) {
        final int size = a.getNumElements();

        double min = a.get(0);
        for( int i = 1; i < size; i++ ) {
            double val = a.get(i);
            if( val < min ) {
                min = val;
            }
        }

        return min;
    }
542506
public static <T extends Comparable<? super T>> T max(T[] numberArray) {
		if (isEmpty(numberArray)) {
			throw new IllegalArgumentException("Number array must not empty !");
		}
		T max = numberArray[0];
		for (int i = 0; i < numberArray.length; i++) {
			if (ObjectUtil.compare(max, numberArray[i]) < 0) {
				max = numberArray[i];
			}
		}
		return max;
	}
920389
public static int getMaxIndex(DoubleMatrix1D v){
	  	int maxIndex = -1;
	  	double maxValue = -Double.MAX_VALUE;
	  	for(int i=0; i<v.size(); i++){
	  		if(v.getQuick(i)>maxValue){
	  			maxIndex = i;
	  			maxValue = v.getQuick(i); 
	  		}
	  	}
	  	return maxIndex; 
	  }
437997
public int getMaxValueIndex(double[] array) {

        int index = 0;
        double max = Integer.MIN_VALUE;

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

        return index;
    }
262079
public static double elementMax( DMatrix5x5 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.a15 > max ) max = a.a15;
        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.a25 > max ) max = a.a25;
        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.a35 > max ) max = a.a35;
        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;
        if( a.a45 > max ) max = a.a45;
        if( a.a51 > max ) max = a.a51;
        if( a.a52 > max ) max = a.a52;
        if( a.a53 > max ) max = a.a53;
        if( a.a54 > max ) max = a.a54;
        if( a.a55 > max ) max = a.a55;

        return max;
    }
683906
public double getMax() {
        double max = s.minValue();
        for (int c = 0; c < this.values.length; c++) {
            if (s.gte(values[c], max)) {
                max = values[c];
            }
        }
        return max;
    }