Atelier des rouesLaboratoire EN
Objets/Documentation

repertoire11.py

Je fournis cette pièce pour reproduire ou examiner AT.IDX3.

Télécharger ↓
"""Sample high-bit positions and use implicit prefix counts on bounded cache misses."""
from bisect import bisect_right
from collections import OrderedDict
from struct import pack
from math import gcd
import json
from index10 import M,positions,EF
class Directory(EF):
    def __init__(self,xs,step):
        super().__init__(xs);self.step=step
        self.anchors=[(x>>self.low)+i for i,x in enumerate(xs) if i%step==0]
        self.size=self.bytes+len(pack('<H',step))+2*len(self.anchors)
    def select(self,i):
        j,r=divmod(i,self.step);pos=self.anchors[j]
        bits=self.high>>(pos+1)
        for _ in range(r):

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.