Objets/Documentation
cache21.py
Je fournis le code pour cette étude. Limiter la mémoire de huit adresses
Télécharger ↓"""Conditional rank queries under a fixed LRU cap. Count coefficient evaluations."""
from functools import lru_cache
import json
from stables19 import graph,unrank,count
def study(vertex):
adjacency=graph();mask=((1<<34)-1)&~(1<<vertex)&~adjacency[vertex]
size=count(mask,7);ranks=[(2*j+1)*size//16 for j in range(8)]
assert not set(ranks)&{i*(size-1)//7 for i in range(8)}
controls=[unrank(vertex,8,r) for r in ranks]
rows=[]
for capacity in (16,64,256):
@lru_cache(maxsize=capacity)
def poly(rem):
if not rem:return (1,)