Computes the maximum of the given values
@param {Array<number>} input
@return {number}
10500
function max(input) {
                if (!Array.isArray(input)) {
                    throw new Error('input must be an array');
                }

                if (input.length === 0) {
                    throw new Error('input must not be empty');
                }

                var max = input[0];
                for (var i = 1; i < input.length; i++) {
                    if (input[i] > max) max = input[i];
                }
                return max;
            }
1073405
function limit(out, a, max) {
  var mSq = a[0] * a[0] + a[1] * a[1];

  if (mSq > max * max) {
    var n = Math.sqrt(mSq);
    out[0] = a[0] / n * max;
    out[1] = a[1] / n * max;
  } else {
    out[0] = a[0];
    out[1] = a[1];
  }

  return out;
}
103476
function maxOrMin( args, method ) {
            var m, n,
                i = 0;

            if ( isArray( args[0] ) ) args = args[0];
            m = new BigNumber( args[0] );

            for ( ; ++i < args.length; ) {
                n = new BigNumber( args[i] );

                // If any number is NaN, return NaN.
                if ( !n.s ) {
                    m = n;
                    break;
                } else if ( method.call( m, n ) ) {
                    m = n;
                }
            }

            return m;
        }
940860
function arrayMax(data) {
	var i = data.length,
		max = data[0];

	while (i--) {
		if (data[i] > max) {
			max = data[i];
		}
	}
	return max;
}
1188647
public static int whichMax(float[] x) {
        float m = Float.NEGATIVE_INFINITY;
        int which = 0;

        for (int i = 0; i < x.length; i++) {
            if (x[i] > m) {
                m = x[i];
                which = i;
            }
        }

        return which;
    }
401303
function min( arr ) {
	if ( !Array.isArray( arr ) ) {
		throw new TypeError( 'min()::invalid input argument. Must provide an array.' );
	}
	var len = arr.length,
		val = arr[ 0 ];

	for ( var i = 1; i < len; i++ ) {
		if ( arr[ i ] < val ) {
			val = arr[ i ];
		}
	}
	return val;
}
660250
protected int max(int[] v)
	{
		int x = 0;
		for (int i : v)
		{
			if (i > x) x = i;
		}
		return x;
	}
421147
function sum(input, initial) {

    return (!isArray(input)) ? input :
        input.reduce(function(prev, curr) {
            return prev + curr;
        }, initial || 0);
}
911760
function getMaxSumStack(arr) { //here!!!
    let maxValue = Number.MIN_VALUE;
    arr
      .forEach((d) => {
        let stackSum = computeArrayValueSum(d);
        if (stackSum > maxValue) {
          maxValue = stackSum;
        }
      });
      return maxValue;
  }
1331373
def maximum(self, value):
        
        self._remove_max()
        if value is None:
            return
        self._add_max(val=value)
40227
function (value, min, max) {
            var interval;
            if (min > max) {
                max = min + max;
                min = max - min;
                max = max - min;
            }
            interval = max - min;
            return min + ((value % interval) + interval) % interval;
        }
474502
private float limit(float value, float min, float max) {
    return Math.min(Math.max(min, value), max);
  }
1293399
public static long[] getMaxShape(INDArray...inputs) {
        if(inputs == null)
            return null;
        else if(inputs.length < 2)
            return inputs[0].shape();
        else {
            long[] currMax = inputs[0].shape();
            for(int i = 1; i <  inputs.length; i++) {
                if(inputs[i] == null) {
                    continue;
                }
                if(ArrayUtil.prod(currMax) < inputs[i].length()) {
                    currMax = inputs[i].shape();
                }
            }

            return currMax;
        }
    }
265507
private int getMaximum() {
		int max = 0;
		for (int x = 0; x <= T.length - 1; x++) {
			if (T[x] > max) max = T[x];
			if (A[x] > max) max = A[x];
			if (C[x] > max) max = C[x];
			if (G[x] > max) max = G[x];
		}
		return max;
	}
88862
function max(expression) {

        //Define output
		var outData;
		
		//If there's no expression
		if (!expression){
		
			//Just assign current items
			outData = this.items;
		}
		else{
		
			//Otherwise apply select condition
			outData = jslinq(this.items)
				.select(expression)
				.toList();
		}
		
		//If array has no elements, returns null
		if (outData.length === 0){
			return null;
		}
		else{
		
			//Apply orderby
			outData = jslinq(outData)
				.orderBy(function(x) { return x; })
				.toList();
				
			//Returns last element
			return outData[outData.length - 1];
		}
    }
807163
private int minLimit(int input, int min) {
        if (input < min) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "Config: " + input + " too small.");
            }
            return min;
        }
        return input;
    }
1214450
function moving_maximum(array, n) {
  var nums = [];

  for (i in array) {
    if (_.isNumber(array[i])) {
      nums.push(array[i]);
      if (nums.length > n) {
	nums.splice(0,1); /* Remove the first element of the array */
      }
      /* Take the average of the n items in this array */
      var maximum = _.max(nums);
      array[i] = maximum;
    }
  }

  return array;
}