diff --git a/py/competitors.py b/py/competitors.py index 3d7c4698..f2bc0077 100644 --- a/py/competitors.py +++ b/py/competitors.py @@ -205,7 +205,10 @@ def select(TS, P, C): if len(P) >= B+1: break - del U[s] + try: + del U[s] + except: + pass C = C - set([s]) ptime = time.clock() - ptime_start @@ -280,7 +283,10 @@ def select(TS, P, C): break Cg = Cg | U[s] - del U[s] + try: + del U[s] + except: + pass C = C - set([s]) ptime = time.clock() - ptime_start diff --git a/py/experimentAdequate.py b/py/experimentAdequate.py index b099aa71..f3eb2ec1 100644 --- a/py/experimentAdequate.py +++ b/py/experimentAdequate.py @@ -121,8 +121,8 @@ def one_(x): return 1 sOut = "{}/{}-{}.pickle".format(sPath, "FAST-all", run+1) pickle.dump(sel, open(sOut, "wb")) tOut = "{}/{}-{}.pickle".format(tPath, "FAST-all", run+1) - pickle.dump((pTime, cTime, rTime, fdl, tsr), open(tOut, "wb")) - print("FAST-all", pTime, cTime, rTime, fdl, tsr) + pickle.dump((pTime, cTime, sTime, fdl, tsr), open(tOut, "wb")) + print("FAST-all", pTime, cTime, sTime, fdl, tsr) # WHITEBOX EXPERIMENTS diff --git a/py/fastr_adequate.py b/py/fastr_adequate.py index 018e37a1..a1e5021d 100644 --- a/py/fastr_adequate.py +++ b/py/fastr_adequate.py @@ -90,7 +90,7 @@ def loadSignatures(input_file): return sig, time.clock() - start -def loadCoverage(wBoxFile): +def loadCoverageStart1(wBoxFile): C = defaultdict(set) with open(wBoxFile) as fin: for tc, cov in enumerate(fin): @@ -106,7 +106,7 @@ def fast_pw(input_file, wBoxFile, r, b, bbox=False, k=5, memory=False): n = r * b # number of hash functions tC0 = time.clock() - C = loadCoverage(wBoxFile) + C = loadCoverageStart1(wBoxFile) tC1 = time.clock() maxCov = reduce(lambda x, y: x | y, C.values()) @@ -225,7 +225,7 @@ def fast_(input_file, wBoxFile, selsize, r, b, bbox=False, k=5, memory=False): n = r * b # number of hash functions tC0 = time.clock() - C = loadCoverage(wBoxFile) + C = loadCoverageStart1(wBoxFile) tC1 = time.clock() maxCov = reduce(lambda x, y: x | y, C.values())