Atelier des rouesLab FR
Objects/Documentation

repertoire11.py

I provide this item to reproduce or inspect AT.IDX3.

Download ↓
"""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):

Read in context

Comments

Comments from both language editions appear here.

The discussion is open for reading. I’ll enable submissions once spam protection is configured.