// Maximum sepcifies the maximum value that the constraint can allow
489325
func (nc *NumberConstraint) Maximum(n float64) *NumberConstraint {
	nc.applyMaximum = true
	nc.maximum = n
	return nc
}
998109
func (entries Entries) max() (uint64, bool) {
	if len(entries) == 0 {
		return 0, false
	}

	return entries[len(entries)-1].Key(), true
}
616096
func LevenshteinDistanceMax(a, b string, max int) (int, bool) {
	v, wasMax, _ := LevenshteinDistanceMaxReuseSlice(a, b, max, nil)
	return v, wasMax
}
579738
func Max(input Float64Data) (max float64, err error) {

	// Return an error if there are no numbers
	if input.Len() == 0 {
		return math.NaN(), EmptyInputErr
	}

	// Get the first value as the starting point
	max = input.Get(0)

	// Loop and replace higher values
	for i := 1; i < input.Len(); i++ {
		if input.Get(i) > max {
			max = input.Get(i)
		}
	}

	return max, nil
}
54336
func maxRequestConstraint(limitType string, resourceName string, enforced resource.Quantity, request api.ResourceList) error {
	req, reqExists := request[api.ResourceName(resourceName)]
	observedReqValue, _, enforcedValue := requestLimitEnforcedValues(req, resource.Quantity{}, enforced)

	if !reqExists {
		return fmt.Errorf("maximum %s usage per %s is %s.  No request is specified.", resourceName, limitType, enforced.String())
	}
	if observedReqValue > enforcedValue {
		return fmt.Errorf("maximum %s usage per %s is %s, but request is %s.", resourceName, limitType, enforced.String(), req.String())
	}
	return nil
}
696026
func (x Vector) Max() float64 {
	max := x[0]
	for _, v := range x {
		if v > max {
			max = v
		}
	}
	return max
}
425581
func (q *MultiMatchQuery) MaxExpansions(maxExpansions int) *MultiMatchQuery {
	q.maxExpansions = &maxExpansions
	return q
}
887999
func (l *Logger) max() int64 {
	if l.MaxSize == 0 {
		return int64(defaultMaxSize * megabyte)
	}
	return int64(l.MaxSize) * int64(megabyte)
}
1286882
func (t *Tree) DeleteMax() {
	if t.Root == nil {
		return
	}
	var d int
	t.Root, d = t.Root.deleteMax()
	t.Count += d
	if t.Root == nil {
		return
	}
	t.Root.Color = Black
}
1346593
func (a *AggregateResult) Max(field string, result interface{}) {
	a.Sort(field)

	resultVal := reflect.ValueOf(result)
	if resultVal.Kind() != reflect.Ptr {
		panic("result argument must be an address")
	}

	if resultVal.IsNil() {
		panic("result argument must not be nil")
	}

	resultVal.Elem().Set(a.reduction[len(a.reduction)-1].Elem())
}
233724
func Max(v1, v2 Vect) (out Vect) {
	if v1.X > v2.X {
		out.X = v1.X
	} else {
		out.X = v2.X
	}

	if v1.Y > v2.Y {
		out.Y = v1.Y
	} else {
		out.Y = v2.Y
	}
	return
}
100940
func (q *TermRangeQuery) Max(max string, inclusive bool) *TermRangeQuery {
	q.options["max"] = max
	q.options["inclusive_max"] = inclusive
	return q
}
572360
func (as ArraySpec) Max(val Input) Input {
	return as.proc(func(i Input) Input {
		return i.Max(val)
	})
}
240784
func Max(Len int, Less func(i, j int) bool) int {
	mx := 0
	for i := 1; i < Len; i++ {
		if Less(mx, i) {
			mx = i
		}
	}
	return mx
}
1090146
func maxIndex(start, limit, total int) (max int) {
	if limit <= 0 {
		limit = mock.DefaultLimit
	}
	if limit > mock.MaxLimit {
		limit = mock.MaxLimit
	}
	max = total
	if start+limit < max {
		max = start + limit
	}
	return max
}
953845
func maxfor(z *big.Int, n, sign int) {
	arith.Sub(z, arith.BigPow10(uint64(n)), 1)
	if sign < 0 {
		z.Neg(z)
	}
}
485203
func Max(v1, v2 Value) (Value, error) {
	return minmax(v1, v2, false)
}