Godtone
Joined 17 December 2020
m →My Python 3 code: added powerset function |
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 | ||
def inconsistent_ivs_by_val(ivs, val, threshold=1/2): | |||
return [ i for i in ivs if abs(iv_map_err(i,val))>=threshold ] | |||
</syntaxhighlight> | </syntaxhighlight> | ||