Objets/Documentation
contextes.py
Programme ou résultat du contrôle reproductible dans le dossier compression.
Télécharger ↓"""Binary order-two types, rank and inverse checked against all eight-bit strings."""
from collections import defaultdict
from functools import lru_cache
from itertools import product
import json
def counts(word):
c=[0]*8
for a,b,t in zip(word,word[1:],word[2:]):
c[4*a+2*b+t]+=1
return tuple(c)
def next_state(ctx,edges,bit):
index=2*ctx+bit