Exemple #1
0
 def test_radius_count_intersect(self, qty=10):
     #sdm.initialize()
     for i in range(qty):
         a = Bitstring()
         b = Bitstring()
         cnt1 = sdm.thread_radius_count_intersect(a, b)
         cnt2 = sdm.thread_radius_count_intersect(a, b)
         self.assertEqual(cnt1, cnt2)
Exemple #2
0
 def test_radius_count_intersect(self, qty=10):
     sdm.initialize()
     for i in range(qty):
         a = Bitstring()
         b = Bitstring()
         cnt1 = sdm.thread_radius_count_intersect(a, b)
         cnt2 = sdm.thread_radius_count_intersect(a, b)
         self.assertEqual(cnt1, cnt2)
     sdm.free()
Exemple #3
0
def table_7_1():
    n = sdm.get_dimension()
    a = Bitstring()
    v = []
    for i in range(550):
        b = a.copy()
        b.bitrandomswap(i)
        v.append([ i, sdm.thread_radius_count_intersect(a, b) ])
        print i
        sys.stdout.flush()
    return v
Exemple #4
0
def table_7_1():
    n = sdm.get_dimension()
    a = Bitstring()
    v = []
    for i in range(550):
        b = a.copy()
        b.bitrandomswap(i)
        v.append([i, sdm.thread_radius_count_intersect(a, b)])
        print i
        sys.stdout.flush()
    return v