// Covers computes whether the prepared geometry covers the other prepared
// geometry.
966573
func (p *PGeometry) Covers(other *Geometry) (bool, error) {
	return p.predicate("covers", cGEOSPreparedCovers, other)
}
1249705
func (s VertexSet) Contains(v int) bool {
	switch {
	case s.set == nil:
		return true
	case len(s.set) == 0 || v < s.set[0].a:
		return false
	}
	// The smallest index i such that v < set[i].a
	i := sort.Search(len(s.set), func(i int) bool {
		return v < s.set[i].a
	})
	if v >= s.set[i-1].b {
		return false
	}
	return true
}
609275
func (g *Geometry) Simplify(tolerance float64) (*Geometry, error) {
	return g.simplify("simplify", cGEOSSimplify, tolerance)
}
153194
func (s *Set) Subset(t *Set) bool {
	// Check if all elements in the parameter set are contained within the set
	for _, v := range t.Enumerate() {
		// Check if element is contained, if not, return false
		if !s.Has(v) {
			return false
		}
	}

	return true
}
820115
public boolean covers( Geometry geometry, boolean usePrepared ) {
        if (!getEnvelope().covers(geometry.getEnvelopeInternal())) {
            return false;
        }
        if (usePrepared) {
            if (preparedGeometry == null) {
                preparedGeometry = PreparedGeometryFactory.prepare(getGeometry());
            }
            return preparedGeometry.covers(geometry);
        } else {
            return getGeometry().covers(geometry);
        }
    }
937936
func (g Geometry) Geometry() orb.Geometry {
	if g.Coordinates != nil {
		return g.Coordinates
	}

	c := make(orb.Collection, 0, len(g.Geometries))
	for _, geom := range g.Geometries {
		c = append(c, geom.Geometry())
	}
	return c
}
167310
func (c *Constraint) Includes(v string) bool {
	for _, pattern := range c.Include {
		if ok, _ := filepath.Match(pattern, v); ok {
			return true
		}
	}
	return false
}
254811
func (e *domEngine) Contains(c Compo) bool {
	e.mutex.RLock()
	defer e.mutex.RUnlock()

	_, ok := e.compos[c]
	return ok
}
1287591
func (s *set) Intersect(other Set) Set {
	o := other.(*set)
	n, m := s.Len(), o.Len()
	ss := s
	so := o
	if m < n {
		ss = o
		so = s
		n = m
	}

	r := newset(n)
	ss.Foreach(func(x *Term) {
		if so.Contains(x) {
			r.Add(x)
		}
	})
	return r
}
503783
func (p *PGeometry) ContainsP(other *Geometry) (bool, error) {
	return p.predicate("contains", cGEOSPreparedContainsProperly, other)
}
588449
func (t Any) Contains(other Type) bool {
	if _, ok := other.(*Function); ok {
		return false
	}
	for i := range t {
		if Compare(t[i], other) == 0 {
			return true
		}
	}
	return len(t) == 0
}
1235135
func (p PortProtocol) Covers(other PortProtocol) bool {
	if p.Port != other.Port {
		return false
	}
	if p.Protocol != other.Protocol {
		return p.Protocol == "" || p.Protocol == ProtoAny
	}
	return true
}
737240
func (t *GeometryCollection) AddGeometries(g ...interface{}) {
	t.Geometries = append(t.Geometries, g...)
}
338123
func (r Region) Contains(point int) bool {
	return point >= r.From && point <= r.To
}
153179
func (g *Geometry) Intersection(other *Geometry) (*Geometry, error) {
	return g.binaryTopo("Intersection", cGEOSIntersection, other)
}
346954
func (r Rect) Contains(u Vec) bool {
	return r.Min.X <= u.X && u.X <= r.Max.X && r.Min.Y <= u.Y && u.Y <= r.Max.Y
}
622687
func (g *Geometry) Holes() ([]*Geometry, error) {
	n, err := intFromC("NInteriorRing", cGEOSGetNumInteriorRings(g.g), -1)
	if err != nil {
		return nil, err
	}
	holes := make([]*Geometry, n)
	for i := 0; i < n; i++ {
		// According to the GEOS C API, GEOSGetInteriorRingN returns a pointer
		// to internal storage and must not be destroyed directly, so we bypass
		// the usual constructor to avoid the finalizer.
		ring, err := geomFromPtrUnowned(cGEOSGetInteriorRingN(g.g, C.int(i)))
		if err != nil {
			return nil, err
		}
		holes[i] = ring
	}
	return holes, nil
}