Beispiel #1
0
    for reduction in range(1, 30 + 1):
        B = int(numOfTCS * reduction / 100)

        for run in range(repeats):
            pTime, rTime, sel = fastr.fastPlusPlus(inputFile, dim=dim, B=B)
            fdl = metric.fdl(sel, faultMatrix, javaFlag)
            sOut = "{}/{}-{}-{}.pickle".format(sPath, "FAST++", reduction,
                                               run + 1)
            pickle.dump(sel, open(sOut, "wb"))
            tOut = "{}/{}-{}-{}.pickle".format(tPath, "FAST++", reduction,
                                               run + 1)
            pickle.dump((pTime, rTime, fdl), open(tOut, "wb"))
            print("FAST++", reduction, pTime, rTime, fdl)

        for run in range(repeats):
            pTime, rTime, sel = fastr.fastCS(inputFile, dim=dim, B=B)
            fdl = metric.fdl(sel, faultMatrix, javaFlag)
            sOut = "{}/{}-{}-{}.pickle".format(sPath, "FAST-CS", reduction,
                                               run + 1)
            pickle.dump(sel, open(sOut, "wb"))
            tOut = "{}/{}-{}-{}.pickle".format(tPath, "FAST-CS", reduction,
                                               run + 1)
            pickle.dump((pTime, rTime, fdl), open(tOut, "wb"))
            print("FAST-CS", reduction, pTime, rTime, fdl)

        for run in range(repeats):
            pTime, rTime, sel = fastr.fast_pw(inputFile,
                                              r,
                                              b,
                                              bbox=True,
                                              k=k,
Beispiel #2
0
            B = int(numOfTCS * reduction / 100)
            pTime, rTime, sel = fastr.fastPlusPlus(inputFile,
                                                   dim=dim,
                                                   B=B,
                                                   memory=False)
            sOut = "{}/{}-{}.pickle".format(sPath, "FAST++", reduction + 1)
            pickle.dump(sel, open(sOut, "wb"))
            tOut = "{}/{}-{}.pickle".format(tPath, "FAST++", reduction + 1)
            pickle.dump((pTime, rTime), open(tOut, "wb"))
            print("FAST++", reduction + 1, pTime, rTime)

    if alg == "FAST-CS":
        for reduction in range(repetitions):
            B = int(numOfTCS * reduction / 100)
            pTime, rTime, sel = fastr.fastCS(inputFile,
                                             dim=dim,
                                             B=B,
                                             memory=False)
            sOut = "{}/{}-{}.pickle".format(sPath, "FAST-CS", reduction + 1)
            pickle.dump(sel, open(sOut, "wb"))
            tOut = "{}/{}-{}.pickle".format(tPath, "FAST-CS", reduction + 1)
            pickle.dump((pTime, rTime), open(tOut, "wb"))
            print("FAST-CS", reduction + 1, pTime, rTime)

    if alg == "FAST-pw":
        for reduction in range(repetitions):
            B = int(numOfTCS * reduction / 100)
            pTime, rTime, sel = fastr.fast_pw(inputFile,
                                              r,
                                              b,
                                              bbox=True,
                                              k=k,