// Lt returns true if the first value is less than the second.
168767
func (t Term) Lt(args ...interface{}) Term {
	return constructMethodTerm(t, "Lt", p.Term_LT, args, map[string]interface{}{})
}
1285562
func falsePositive(l, k int) func(float64) float64 {
	return func(j float64) float64 {
		return 1.0 - math.Pow(1.0-math.Pow(j, float64(k)), float64(l))
	}
}
934588
func Lt(lhs Expression, rhs Expression) BoolExpression {
	return newBoolExpression(lhs, rhs, []byte("<"))
}
1144577
func le(arg1, arg2 interface{}) (bool, error) {
	// <= is < or ==.
	lessThan, err := lt(arg1, arg2)
	if lessThan || err != nil {
		return lessThan, err
	}
	return eq(arg1, arg2)
}
530906
func (lrs LinearRegressionSeries) Len() int {
	return util.Math.MinInt(lrs.GetLimit(), lrs.InnerSeries.Len()-lrs.GetOffset())
}
887431
func (u *Ugen) LT(val Input) Input {
	return binOpLT(u.Rate, u, val, u.NumOutputs)
}
708223
func (s *Condition) SetLt(v int64) *Condition {
	s.Lt = &v
	return s
}
1169846
func lt(arg1, arg2 interface{}) (bool, error) {
	v1 := reflect.ValueOf(arg1)
	k1, err := basicKind(v1)
	if err != nil {
		return false, err
	}
	v2 := reflect.ValueOf(arg2)
	k2, err := basicKind(v2)
	if err != nil {
		return false, err
	}
	if k1 != k2 {
		return false, errBadComparison
	}
	truth := false
	switch k1 {
	case boolKind, complexKind:
		return false, errBadComparisonType
	case floatKind:
		truth = v1.Float() < v2.Float()
	case intKind:
		truth = v1.Int() < v2.Int()
	case stringKind:
		truth = v1.String() < v2.String()
	case uintKind:
		truth = v1.Uint() < v2.Uint()
	default:
		panic("invalid kind")
	}
	return truth, nil
}
942089
func (s Seq) Min() float64 {
	if s.Len() == 0 {
		return 0
	}
	min := s.GetValue(0)
	var value float64
	for i := 1; i < s.Len(); i++ {
		value = s.GetValue(i)
		if value < min {
			min = value
		}
	}
	return min
}
859412
func (b *Sortable) Less(i, j int) bool {
	for _, c := range b.Comparators {
		if c(i, j) {
			return true
		} else if c(j, i) {
			return false
		}
	}
	return false
}
677325
func (a VarRefs) Less(i, j int) bool {
	if a[i].Val != a[j].Val {
		return a[i].Val < a[j].Val
	}
	return a[i].Type < a[j].Type
}
279072
func (ms *MultiSorter) Less(i, j int) bool {
	p, q := &ms.data[i], &ms.data[j]
	var k int
	for k = 0; k < len(ms.less)-1; k++ {
		less := ms.less[k]
		switch {
		case less(p, q):
			// p < q
			return true
		case less(q, p):
			// p > q
			return false
		}
		// p == q; try next comparison
	}
	return ms.less[k](p, q)
}
1128336
func Equal(l, r interface{}) bool {
	if l == nil || r == nil {
		return false
	}
	switch val := l.(type) {
	case *Error:
		return val.Equal(r)
	case error:
		return newError(val, 2).(*Error).Equal(r)
	default:
		panic("invalid type, must be *Error")
	}
}
665758
func (r *Ruler) compare(f *Rule, actual interface{}) bool {
	ruleDebug("beginning comparison")
	expected := f.Value
	switch f.Comparator {
	case "eq":
		return actual == expected

	case "neq":
		return actual != expected

	case "gt":
		return r.inequality(gt, actual, expected)

	case "gte":
		return r.inequality(gte, actual, expected)

	case "lt":
		return r.inequality(lt, actual, expected)

	case "lte":
		return r.inequality(lte, actual, expected)

	case "exists":
		// not sure this makes complete sense
		return actual != nil

	case "nexists":
		return actual == nil

	case "regex":
		fallthrough
	case "contains":
		fallthrough
	case "matches":
		return r.regexp(actual, expected)

	case "ncontains":
		return !r.regexp(actual, expected)
	default:
		//should probably return an error or something
		//but this is good for now
		//if comparator is not implemented, return false
		ruleDebug("unknown comparator %s", f.Comparator)
		return false
	}
}
180116
func R(minX, minY, maxX, maxY float64) Rect {
	return Rect{
		Min: Vec{minX, minY},
		Max: Vec{maxX, maxY},
	}
}
1137108
func (v Value) LessThanEq(w Value) bool {
	if v == w {
		return true
	}
	return v.LessThan(w)
}
282403
func (b byString) Less(i, j int) bool {
	ithVal := b.Identifier(b.Data.Index(i).Interface())
	jthVal := b.Identifier(b.Data.Index(j).Interface())
	if ithVal == jthVal {
		return b.Indices[i] < b.Indices[j]
	}
	return ithVal < jthVal
}