Returns the value of the maximum entry in this counter. This is also the
Linfinity norm. An empty counter is given a max value of
Double.NEGATIVE_INFINITY.

@param c
The Counter to find the max of
@return The maximum value of the Counter
964354
public static <E> double max(Counter<E> c) {
    double max = Double.NEGATIVE_INFINITY;
    for (double v : c.values()) {
      max = Math.max(max, v);
    }
    return max;
  }
50717
public int maxChannel() {
		int c = 0;
		if(getValue(c) < getValue(1)) c=1;
		if(getValue(c) < getValue(2)) c=2;
		return c;
	}
1319563
public static <E> double logSum(Counter<E> c) {
    return ArrayMath.logSum(ArrayMath.unbox(c.values()));
  }
732331
@Override
	protected DoubleMatrix1D getUb() {
		if (this.limitedUb == null) {
			if (super.getUb() == null) {
				this.limitedUb = F1.make(getC().size(), maxUBValue);
			} else {
				this.limitedUb = F1.make(super.getUb().size());
				for (int i = 0; i < super.getUb().size(); i++) {
					double ubi = super.getUb().getQuick(i);
					if (maxUBValue < ubi) {
						log.warn("the " + i +"-th upper bound was limited form "+ubi+" to the value of maxUBValue: " + maxUBValue);
						limitedUb.setQuick(i, maxUBValue);
					} else {
						limitedUb.setQuick(i, ubi);
					}
				}
			}
		}
		return limitedUb;
	}
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;
    }
524604
public static double elementMax( DMatrixSparseCSC A ) {
        if( A.nz_length == 0)
            return 0;

        // if every element is assigned a value then the first element can be a max.
        // Otherwise zero needs to be considered
        double max = A.isFull() ? A.nz_values[0] : 0;
        for(int i = 0; i < A.nz_length; i++ ) {
            double val = A.nz_values[i];
            if( val > max ) {
                max = val;
            }
        }

        return max;
    }
934426
int getLongestChainLength() {
		int maxLen = 0;

		for (Entry<?, ?> entry : table) {
			int thisLen = 0;
			while (entry != null) {
				thisLen++;
				entry = entry.next;
			}
			maxLen = Math.max(maxLen, thisLen);
		}

		return maxLen;
	}
1062542
public static double elementMaxReal( ZMatrixD1 a ) {
        final int size = a.getDataLength();

        double max = a.data[0];
        for( int i = 2; i < size; i += 2 ) {
            double val = a.data[i];
            if( val > max ) {
                max = val;
            }
        }

        return max;
    }
659964
public static <E> double jaccardCoefficient(Counter<E> c1, Counter<E> c2) {
    double minCount = 0.0, maxCount = 0.0;
    for (E key : Sets.union(c1.keySet(), c2.keySet())) {
      double count1 = c1.getCount(key);
      double count2 = c2.getCount(key);
      minCount += (count1 < count2 ? count1 : count2);
      maxCount += (count1 > count2 ? count1 : count2);
    }
    return minCount / maxCount;
  }
147522
public static int whichMax(double[] x) {
        double m = Double.NEGATIVE_INFINITY;
        int which = 0;

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

        return which;
    }
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;
	}
1071580
public static double max(final double[] data, final int startInclusive, final int endExclusive) {
    checkArgument(endExclusive > startInclusive);
    checkArgument(startInclusive >= 0);
    checkArgument(endExclusive <= data.length);

    double maxValue = Double.NEGATIVE_INFINITY;
    for (int i = startInclusive; i < endExclusive; ++i) {
      maxValue = Math.max(maxValue, data[i]);
    }
    return maxValue;
  }
1113285
public static double max(DoubleTuple t)
    {
        return DoubleTupleFunctions.reduce(
            t, Double.NEGATIVE_INFINITY, Math::max);
    }
468142
public T max() {
        TObjectIntIterator<T> iter = counts.iterator();
        int maxCount = -1;
        T max = null;
        while (iter.hasNext()) {
            iter.advance();
            int count = iter.value();
            if (count > maxCount) {
                max = iter.key();
                maxCount = count;
            }
        }
        return max;
    }
1225563
@Override
  public IVersion getMaximum()
  {
    if (isBounded) {
      IVersion v2 = range2.getMaximum();
      return v2;
    }

    throw new UnsupportedOperationException();
  }
15798
public static double elementMax( DMatrix4 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;

        return max;
    }
722426
@Override
    public Long getMaximumLength() {
        calculator();
        if (simple) {
            return v[3] - v[0];
        } else {
            Weight maxDur = cn.getMaximumDuration();
            return maxDur.isInfinity() ? null : maxDur.value();
        }
    }