MCPcopy Create free account
hub / github.com/chaimleib/intervaltree / difference

Method difference

intervaltree/intervaltree.py:401–410  ·  view source on GitHub ↗

Returns a new tree, comprising all intervals in self but not in other.

(self, other)

Source from the content-addressed store, hash-verified

399 return self.discard(Interval(begin, end, data))
400
401 def difference(self, other):
402 """
403 Returns a new tree, comprising all intervals in self but not
404 in other.
405 """
406 ivs = set()
407 for iv in self:
408 if iv not in other:
409 ivs.add(iv)
410 return IntervalTree(ivs)
411
412 def difference_update(self, other):
413 """

Callers 2

test_differenceFunction · 0.80
symmetric_differenceMethod · 0.80

Calls 2

IntervalTreeClass · 0.85
addMethod · 0.45

Tested by 1

test_differenceFunction · 0.64