// ContainsVertex reports a +1 if the target vertex is contained, -1 if it is
// not contained, and 0 if the incident edges consisted of matched sibling pairs.
488789
func (q *ContainsVertexQuery) ContainsVertex() int {
	// Find the unmatched edge that is immediately clockwise from Ortho(P).
	referenceDir := Point{q.target.Ortho()}

	bestPoint := referenceDir
	bestDir := 0

	for k, v := range q.edgeMap {
		if v == 0 {
			continue // This is a "matched" edge.
		}
		if OrderedCCW(referenceDir, bestPoint, k, q.target) {
			bestPoint = k
			bestDir = v
		}
	}
	return bestDir
}
282085
func (c Circle) Contains(u Vec) bool {
	toCenter := c.Center.To(u)
	return c.Radius >= toCenter.Len()
}
734981
func (l Line) Contains(v Vec) bool {
	return l.Closest(v).Eq(v)
}
646876
func (i Index) Contains(k string) bool {
	_, ok := i[k]
	return ok
}
1212446
func AsVertexList(s *Set) []Vertex {
	rawList := s.List()
	vertexList := make([]Vertex, len(rawList))
	for i, raw := range rawList {
		vertexList[i] = raw.(Vertex)
	}
	return vertexList
}
1223856
func (idx *MemoryIndex) Contains(h plumbing.Hash) (bool, error) {
	_, ok := idx.findHashIndex(h)
	return ok, nil
}
63098
func (m *Map) Contains(k KeyType) bool {
	_, ok := m.Get(k)
	return ok
}
802088
func NewVertex(id string, data interface{}) *Vertex {
	return &Vertex{
		Id:        id,
		Data:      data,
		neighbors: make(map[string]*Vertex),
	}
}
655637
func (p *Polygon) containsNonCrossingBoundary(o *Loop, reverse bool) bool {
	var inside bool
	for _, l := range p.loops {
		x := l.containsNonCrossingBoundary(o, reverse)
		inside = (inside != x)
	}
	return inside
}
866466
func (c *chainView) Contains(node *blockNode) bool {
	c.mtx.Lock()
	contains := c.contains(node)
	c.mtx.Unlock()
	return contains
}
1042966
func Contains(a interface{}, b interface{}) BoolPredicate {
	return func() bool {
		aval, ok := a.([]string)
		if !ok {
			return false
		}
		bval, ok := b.(string)
		if !ok {
			return false
		}
		for _, v := range aval {
			if v == bval {
				return true
			}
		}
		return false
	}
}
942609
func (e *Error) Contains(sub string) bool {
	if e.err == nil {
		return false
	}
	return strings.Contains(e.formatError(), sub)
}
660096
func (f *PkgFilter) Contains(i uint16) bool {
	byt := i / 8
	bit := i % 8

	// Read the i-th bit in the filter.
	// TODO(conner): ignore if > count to prevent panic?
	return f.filter[byt]&(1<<(7-bit)) != 0
}
1246691
func contains(list interface{}, value string) bool {
	switch l := list.(type) {
	case []interface{}:
		for _, v := range l {
			if v == value {
				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)
}
99427
func NewVertex(pub *btcec.PublicKey) Vertex {
	var v Vertex
	copy(v[:], pub.SerializeCompressed())
	return v
}
414934
func (body Body) Contains(x *Expr) bool {
	for _, e := range body {
		if e.Equal(x) {
			return true
		}
	}
	return false
}