Godtone (talk | contribs)
m →My Python 3 code: added powerset function
Godtone (talk | contribs)
m →My Python 3 code: added function to get inconsistent intervals (ivs) according to a val called inconsistent_ivs_by_val
Line 650: Line 650:
pset |= {frozenset([ s[j] for j in range(len(s)) if (i & (1<<j)) ])}
pset |= {frozenset([ s[j] for j in range(len(s)) if (i & (1<<j)) ])}
return pset
return pset
# how to make a list of inconsistently-mapped intervals from ivs
def inconsistent_ivs_by_val(ivs, val, threshold=1/2):
# according to a val map v where "inconsistent" is usually defined as
return [ i for i in ivs if abs(iv_map_err(i,val))>=threshold ]
# over 1/2 a step of error but is customisable:
# mapping = make_val(prime_limit(41), ed(80),'k') # 41-limit val 80k aka with 31/16 mapped sharp
# ic = [r for r in odd_limit(45,[43],complements=False) if abs(iv_map_err(r,mapping))>=1/2]
# (ic now has all the intervals in the no-43's 45-odd-limit mapped with 80k)
</syntaxhighlight>
</syntaxhighlight>