Atelier des rouesLaboratoire EN
Objets/Documentation

rotations30.py

Quand tourner un calendrier change son compte · rotations30.py

Télécharger ↓
"""Rotate a six-residue footprint. Compare order alone with the two-slot dwell rule."""
from itertools import combinations,product
from functools import lru_cache
from strate29 import accepts
from longueurs28 import transfer
import json

@lru_cache(None)
def local(n,d,visits,k):
    shifts={(d+j+5)%6:j for j in (-1,0,1)}
    prescribed=sorted((t,shifts[t%6]) for t in visits)
    changes=sum(a[1]!=b[1] for a,b in zip(prescribed,prescribed[1:]))
    return changes<=k,accepts(prescribed,6*n,k)

def study():
    base=(2,0,2)*2;cache={};out=[]

Lire dans son contexte

Commentaires

Les commentaires en français et en anglais sont réunis ici.

La discussion reste consultable. J’ouvrirai les participations dès que la protection antispam sera configurée.