Tell if self is partly contained in other.
510906
def overlaps(self, other):
        """"""
        return self.network_address in other or (
            self.broadcast_address in other or (
                other.network_address in self or (
                    other.broadcast_address in self)))
460731
def issubset(self, other):
        """"""
        self._binary_sanity_check(other)
        return set.issubset(self, other)
816200
def intersect(self, other):
        """"""
        if other is FullSpace:
            return self
        if other is TrivialSpace:
            return TrivialSpace
        if isinstance(other, ProductSpace):
            other_ops = set(other.operands)
        else:
            other_ops = {other}
        return ProductSpace.create(
                *sorted(set(self.operands).intersection(other_ops)))
737593
def status(self):
        """"""
        if all(os.path.exists(p.path) for p in self.parts): return 'splitted'
        return False
1068507
def isdisjoint(self, other):
        """"""
        return not bool(self.db.sinter([self.key, other.key]))
1073087
def eq_or_parent(self, other):
        
        return self.parts[: len(other.parts)] == other.parts[: len(self.parts)]
787515
boolean containsExclusive(Envelope2D other) {
		// Note: This will return False, if either envelope is empty, thus no
		// need to call is_empty().
		return other.xmin > xmin && other.xmax < xmax && other.ymin > ymin
				&& other.ymax < ymax;
	}
92334
def equality(self, other):
        """"""
        if not len(self) == len(other):
            return False
        return super().equality(other)
225099
def other_ind(self):
        """"""
        return np.full(self.n_min, self.size - 1, dtype=np.int)
877376
def contains?(x, y)
      self_area = triangle_area(@x1, @y1, @x2, @y2, @x3, @y3)
      questioned_area =
        triangle_area(@x1, @y1, @x2, @y2, x, y) +
        triangle_area(@x2, @y2, @x3, @y3, x, y) +
        triangle_area(@x3, @y3, @x1, @y1, x, y)

      questioned_area <= self_area
    end
236549
def could_be(self, other):
        """"""
        # TODO: Some suffix and title differences should be allowed
        if type(other) is not type(self):
            return NotImplemented
        if self == other:
            return True
        for attr in ['title', 'firstname', 'middlename', 'nickname', 'prefix', 'lastname', 'suffix']:
            if attr not in self or attr not in other:
                continue
            puncmap = dict((ord(char), None) for char in string.punctuation)
            s = self[attr].lower().translate(puncmap)
            o = other[attr].lower().translate(puncmap)
            if s == o:
                continue
            if attr in {'firstname', 'middlename', 'lastname'}:
                if (({len(comp) for comp in s.split()} == {1} and [el[0] for el in o.split()] == s.split()) or
                        ({len(comp) for comp in o.split()} == {1} and [el[0] for el in s.split()] == o.split())):
                    continue
            return False
        return True
70929
def is_within(self, query, subject):
        """"""
        if self.pt_within(query[0], subject) and self.pt_within(query[1], subject):
            return True

        return False
1226627
def is_descendant_of(self, other, include_self=False):
        """"""
        if other.pk == self.pk:
            return include_self

        return self._closure_model.objects.filter(
            parent=other,
            child=self
        ).exclude(pk=self.pk).exists()
109537
def contains_point?(pt)
      pt.x.between?(left, left + width - 1) &&
        pt.y.between?(top, top + height - 1)
    end
756079
public boolean containedIn(SparseNumberVector bv) {
    int i1 = this.iter(), i2 = bv.iter();
    while(this.iterValid(i1)) {
      if(!bv.iterValid(i2)) {
        return false;
      }
      int d1 = this.iterDim(i1), d2 = bv.iterDim(i2);
      if(d1 < d2) {
        return false; // Missing
      }
      if(d1 == d2) {
        if(bv.iterDoubleValue(i2) == 0.) {
          return false;
        }
        i1 = this.iterAdvance(i1);
      }
      i2 = bv.iterAdvance(i2);
    }
    return true;
  }
144769
def _one_contains_other(s1, s2):
    
    return min(len(s1), len(s2)) == len(s1 & s2)
913528
def contains(self, x, y):
        
        left, bottom, right, top = self.aarect().lbrt()
        return (left <= x <= right) and (bottom <= y <= top)