예제 #1
0
파일: test_memory.py 프로젝트: eraoul/sdm
 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)
예제 #2
0
파일: test_memory.py 프로젝트: xpontus/sdm
 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()
예제 #3
0
파일: sdm_utils.py 프로젝트: agent-lee/sdm
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
예제 #4
0
파일: sdm_utils.py 프로젝트: xpontus/sdm
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