Exemplo n.º 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)
Exemplo n.º 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()
Exemplo n.º 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
Exemplo n.º 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