// Contains returns true if values exist between min and max inclusive. The
// values must be sorted before calling Contains or the results are undefined.
347405
func (a *TimestampArray) Contains(min, max int64) bool {
	rmin, rmax := a.FindRange(min, max)
	if rmin == -1 && rmax == -1 {
		return false
	}

	// a.Timestamps[rmin] ≥ min
	// a.Timestamps[rmax] ≥ max

	if a.Timestamps[rmin] == min {
		return true
	}

	if rmax < a.Len() && a.Timestamps[rmax] == max {
		return true
	}

	return rmax-rmin > 0
}
368931
func (b *BinaryTree) Contains(target Comparable) bool {
	return b.search(target) != nil
}
849261
func (f *Filter) Contains(v []byte) bool {
	h := f.hash(v)
	for i := uint64(0); i < f.k; i++ {
		loc := f.location(h, i)
		if f.b[loc>>3]&(1<<(loc&7)) == 0 {
			return false
		}
	}
	return true
}
1168301
func contains(slice []string, str string) bool {
	for _, val := range slice {
		if val == strings.ToLower(str) {
			return true
		}
	}
	return false
}
774150
func (b *Bounding) Contains(c Comparable) bool {
	if b == nil {
		return true
	}
	for d := Dim(0); d < Dim(c.Dims()); d++ {
		if c.Compare(b[0], d) < 0 || c.Compare(b[1], d) > 0 {
			return false
		}
	}
	return true
}
1110084
func (versions Versions) Contains(version Version) bool {
	for _, v := range versions {
		if v == version {
			return true
		}
	}
	return false
}
387322
func (aabb *AABB) Contains(other AABB) bool {
	return aabb.Lower.X <= other.Lower.X &&
		aabb.Upper.X >= other.Upper.X &&
		aabb.Lower.Y <= other.Lower.Y &&
		aabb.Upper.Y >= other.Upper.Y
}
1100352
func Contains(slice []string, item string) bool {
	set := make(map[string]struct{}, len(slice))
	for _, s := range slice {
		set[s] = struct{}{}
	}

	_, ok := set[item]
	return ok
}
702851
func (c *Container) Contains(v uint16) bool {
	if c.isArray() {
		return c.arrayContains(v)
	} else if c.isRun() {
		return c.runContains(v)
	} else {
		return c.bitmapContains(v)
	}
}
338561
func (it *Int64) Contains(ctx context.Context, tsv graph.Value) bool {
	graph.ContainsLogIn(it, tsv)
	it.runstats.Contains += 1
	v := valToInt64(tsv)
	if it.min <= v && v <= it.max {
		it.result = v
		return graph.ContainsLogOut(it, it.toValue(v), true)
	}
	return graph.ContainsLogOut(it, it.toValue(v), false)
}
254608
func (s *OrderedSet) Contains(i string) bool {
	if _, ok := s.m[i]; ok {
		return true
	}
	return false
}
1190373
func Contains(list, value cty.Value) (cty.Value, error) {
	return ContainsFunc.Call([]cty.Value{list, value})
}
1330148
func contains(haystack []string, needle string) bool {
	for _, s := range haystack {
		if needle == strings.TrimFunc(s, func(r rune) bool { return r == '"' }) {
			return true
		}
	}
	return false
}
543844
func Contains(exprs []Expression, e Expression) bool {
	for _, expr := range exprs {
		if e == expr {
			return true
		}
	}
	return false
}
1333793
func contains(s []string, e string) bool {
	for i := range s {
		if s[i] == e {
			return true
		}
	}
	return false
}
1068384
func (it *Fixed) Contains(ctx context.Context, v graph.Value) bool {
	// Could be optimized by keeping it sorted or using a better datastructure.
	// However, for fixed iterators, which are by definition kind of tiny, this
	// isn't a big issue.
	graph.ContainsLogIn(it, v)
	vk := graph.ToKey(v)
	for _, x := range it.values {
		if graph.ToKey(x) == vk {
			it.result = x
			return graph.ContainsLogOut(it, v, true)
		}
	}
	return graph.ContainsLogOut(it, v, false)
}
267699
func (r Region) Contains(point int) bool {
	return point >= r.Begin() && point <= r.End()
}