Пример #1
0
 def test_aggregateand(self, multi):
     ref = set(multi[0])
     ref.intersection_update(*[set(a) for a in multi[1:]])
     rb = RoaringBitmap(multi[0])
     rb.intersection_update(*[RoaringBitmap(a) for a in multi[1:]])
     rb._checkconsistency()
     assert rb == ref
Пример #2
0
	def test_aggregateand(self, multi):
		ref = set(multi[0])
		ref.intersection_update(*[set(a) for a in multi[1:]])
		rb = RoaringBitmap(multi[0])
		rb.intersection_update(*[RoaringBitmap(a) for a in multi[1:]])
		rb._checkconsistency()
		assert rb == ref, name
Пример #3
0
 def test_aggregateand(self):
     data = [[random.randint(0, 1000) for _ in range(2000)] for _ in range(10)]
     ref = set(data[0])
     ref.intersection_update(*[set(a) for a in data[1:]])
     rb = RoaringBitmap(data[0])
     rb.intersection_update(*[RoaringBitmap(a) for a in data[1:]])
     assert ref == set(rb)
     assert rb == ref
Пример #4
0
 def test_aggregateand(self):
     data = [[random.randint(0, 1000) for _ in range(2000)]
             for _ in range(10)]
     ref = set(data[0])
     ref.intersection_update(*[set(a) for a in data[1:]])
     rb = RoaringBitmap(data[0])
     rb.intersection_update(*[RoaringBitmap(a) for a in data[1:]])
     assert ref == set(rb)
     assert rb == ref
Пример #5
0
 def test_issue25(self):
     r = RoaringBitmap({1})
     r.intersection_update(RoaringBitmap([]))
     assert len(r) == 0