checksumsets.py: if BRUTEFORCE_THRESHOLD is 0, don't call bruteforce_D

(and don't depend on bintrees in that case).

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
This commit is contained in:
Daira Hopwood 2020-02-23 11:36:02 +00:00
parent 3c69d7df58
commit 0ea400f339
1 changed files with 1 additions and 1 deletions

View File

@ -59,7 +59,7 @@ BRUTEFORCE_THRESHOLD = 100000
def D(q, zeta, mm):
if DEBUG: print("(q, zeta, mm) =", (q, zeta, mm))
Dcheck = bruteforce_D(q, zeta, min(mm, BRUTEFORCE_THRESHOLD))
Dcheck = [] if BRUTEFORCE_THRESHOLD == 0 else bruteforce_D(q, zeta, min(mm, BRUTEFORCE_THRESHOLD))
(u, m) = (0, 1) # (u + am) : a ∈ Nat is the current arithmetic progression
n = q # the previous min-distance