// minChordAngle returns the smallest of the given values.
495124
func minChordAngle(x s1.ChordAngle, others ...s1.ChordAngle) s1.ChordAngle {
	min := x
	for _, y := range others {
		if y < min {
			min = y
		}
	}
	return min
}
1374374
func Min(values []int64) int64 {
	if len(values) == 0 {
		return 0
	}
	if isSorted(values) {
		return values[0]
	}
	min := values[0]
	for i := 1; i < len(values); i++ {
		v := values[i]
		if min > v {
			min = v
		}
	}
	return min
}
997039
func (q *NumericRangeQuery) Min(min float32, inclusive bool) *NumericRangeQuery {
	q.options["min"] = min
	q.options["inclusive_min"] = inclusive
	return q
}
799595
func MinMax(inReal []float64, inTimePeriod int) ([]float64, []float64) {

	outMin := make([]float64, len(inReal))
	outMax := make([]float64, len(inReal))

	nbInitialElementNeeded := (inTimePeriod - 1)
	startIdx := nbInitialElementNeeded
	outIdx := startIdx
	today := startIdx
	trailingIdx := startIdx - nbInitialElementNeeded
	highestIdx := -1
	highest := 0.0
	lowestIdx := -1
	lowest := 0.0
	for today < len(inReal) {
		tmpLow, tmpHigh := inReal[today], inReal[today]
		if highestIdx < trailingIdx {
			highestIdx = trailingIdx
			highest = inReal[highestIdx]
			i := highestIdx
			i++
			for i <= today {
				tmpHigh = inReal[i]
				if tmpHigh > highest {
					highestIdx = i
					highest = tmpHigh
				}
				i++
			}
		} else if tmpHigh >= highest {
			highestIdx = today
			highest = tmpHigh
		}
		if lowestIdx < trailingIdx {
			lowestIdx = trailingIdx
			lowest = inReal[lowestIdx]
			i := lowestIdx
			i++
			for i <= today {
				tmpLow = inReal[i]
				if tmpLow < lowest {
					lowestIdx = i
					lowest = tmpLow
				}
				i++
			}
		} else if tmpLow <= lowest {
			lowestIdx = today
			lowest = tmpLow
		}
		outMax[outIdx] = highest
		outMin[outIdx] = lowest
		outIdx++
		trailingIdx++
		today++
	}
	return outMin, outMax
}
182836
func (n *Node) Minimum() ([]byte, interface{}, bool) {
	for {
		if n.isLeaf() {
			return n.leaf.key, n.leaf.val, true
		}
		if len(n.edges) > 0 {
			n = n.edges[0].node
		} else {
			break
		}
	}
	return nil, nil, false
}
443395
func (g *Grid) MinSizeHint() image.Point {
	if g.cols == 0 || g.rows == 0 {
		return image.Point{}
	}

	var width int
	for i := 0; i < g.cols; i++ {
		width += g.minColumnWidth(i)
	}

	var height int
	for j := 0; j < g.rows; j++ {
		height += g.minRowHeight(j)
	}

	if g.hasBorder {
		width += g.cols + 1
		height += g.rows + 1
	}

	return image.Point{width, height}
}
53462
func (q *SimpleQueryStringQuery) MinimumShouldMatch(minimumShouldMatch string) *SimpleQueryStringQuery {
	q.minimumShouldMatch = minimumShouldMatch
	return q
}
569244
func MinLenValidator(param string, v reflect.Value) (ValidationResult, error) {
	switch v.Kind() {
	case reflect.String:
		if v.String() == "" {
			return ValidationOK, nil // emptyの場合は無視 これはreqの役目だ
		}
		p, err := strconv.ParseInt(param, 0, 64)
		if err != nil {
			return 0, ErrInvalidConfigValue
		}
		if int64(utf8.RuneCountInString(v.String())) < p {
			return ValidationNG, nil
		}
	case reflect.Array, reflect.Map, reflect.Slice:
		if v.Len() == 0 {
			return ValidationOK, nil
		}
		p, err := strconv.ParseInt(param, 0, 64)
		if err != nil {
			return 0, ErrInvalidConfigValue
		}
		if int64(v.Len()) < p {
			return ValidationNG, nil
		}
	default:
		return 0, ErrValidateUnsupportedType
	}

	return ValidationOK, nil
}
744626
func (s stringSet) minLen() int {
	if len(s) == 0 {
		return 0
	}
	m := len(s[0])
	for _, str := range s {
		if m > len(str) {
			m = len(str)
		}
	}
	return m
}
583349
func (l *lagLogger) Min() int {
	if len(l.measurements) == 0 {
		return -1
	}
	min := int(l.measurements[0].highWaterMark - l.measurements[0].readOffset)
	for _, m := range l.measurements[1:] {
		lag := int(m.highWaterMark - m.readOffset)
		if lag < min {
			min = lag
		}
	}
	return min
}
1134419
func (q *MoreLikeThisQuery) MinimumShouldMatch(minimumShouldMatch string) *MoreLikeThisQuery {
	q.minimumShouldMatch = minimumShouldMatch
	return q
}
1086563
func minFloat64(x float64, others ...float64) float64 {
	min := x
	for _, y := range others {
		if y < min {
			min = y
		}
	}
	return min
}
247121
func builtin_min(args ...Value) (Value, error) {
	if len(args) == 0 {
		return nilValue, fmt.Errorf("missing arguments for function `min`")
	}
	x := args[0]
	for i, size := 1, len(args); i < size; i++ {
		lt, err := args[i].Lt(x)
		if err != nil {
			return Zero(), err
		}
		if lt.Bool() {
			x = args[i]
		}
	}
	return x, nil
}
1303745
func minInt(x int, others ...int) int {
	min := x
	for _, y := range others {
		if y < min {
			min = y
		}
	}
	return min
}
114412
func minimum(integers []int) (minVal int) {
	minVal = math.MaxInt32
	for _, v := range integers {
		if v < minVal {
			minVal = v
		}
	}
	return
}
1179675
func (ta *TrackAttributes) MinKey(key int) *TrackAttributes {
	ta.intAttributes["min_key"] = key
	return ta
}
1346162
func Min(inReal []float64, inTimePeriod int) []float64 {

	outReal := make([]float64, len(inReal))

	if inTimePeriod < 2 {
		return outReal
	}

	nbInitialElementNeeded := inTimePeriod - 1
	startIdx := nbInitialElementNeeded
	outIdx := startIdx
	today := startIdx
	trailingIdx := startIdx - nbInitialElementNeeded
	lowestIdx := -1
	lowest := 0.0
	for today < len(outReal) {

		tmp := inReal[today]

		if lowestIdx < trailingIdx {
			lowestIdx = trailingIdx
			lowest = inReal[lowestIdx]
			i := lowestIdx + 1
			for i <= today {
				tmp = inReal[i]
				if tmp < lowest {
					lowestIdx = i
					lowest = tmp
				}
				i++
			}
		} else if tmp <= lowest {
			lowestIdx = today
			lowest = tmp
		}
		outReal[outIdx] = lowest
		outIdx++
		trailingIdx++
		today++
	}

	return outReal
}