예제 #1
0
파일: Main.py 프로젝트: bgjehu/DTWResearch
def dtw_between_two_testcases(width, height, iteration):
    ts_sum = 0
    tp_sum = 0
    for i in range(iteration):
        a = rand_test_case(width, height)
        b = rand_test_case(width, height)
        cs, ts = find_similarity_in_sequential(a,b,True)
        cp, tp =find_similarity_in_parallel(a,b,2,True)
        ts_sum += ts
        tp_sum += tp
    ts_avg = ts_sum / iteration
    tp_avg = tp_sum / iteration
    print
    print 'sequential: {0:.4f}'.format(ts_avg)
    print 'parallel: {0:.4f}'.format(tp_avg)
예제 #2
0
파일: Main.py 프로젝트: bgjehu/DTWResearch
def dtw_between_two_testcases(width, height, iteration):
    ts_sum = 0
    tp_sum = 0
    for i in range(iteration):
        a = rand_test_case(width, height)
        b = rand_test_case(width, height)
        cs, ts = find_similarity_in_sequential(a, b, True)
        cp, tp = find_similarity_in_parallel(a, b, 2, True)
        ts_sum += ts
        tp_sum += tp
    ts_avg = ts_sum / iteration
    tp_avg = tp_sum / iteration
    print
    print 'sequential: {0:.4f}'.format(ts_avg)
    print 'parallel: {0:.4f}'.format(tp_avg)
예제 #3
0
파일: Main.py 프로젝트: bgjehu/DTWResearch
def find_similarity(i):
    find_similarity_in_sequential(captured, predefined[i],False)
예제 #4
0
파일: Main.py 프로젝트: bgjehu/DTWResearch
def find_similarity(i):
    find_similarity_in_sequential(captured, predefined[i], False)