Objects/Documentation
index10.py
I provide the computation for “The cost of a prefix in four representations”.
Download ↓"""Fixed/adaptive delta directories, Elias-Fano selection and bounded LRU fallback."""
from math import gcd
from bisect import bisect_right
from struct import pack,unpack_from
from collections import OrderedDict
from time import perf_counter_ns
from statistics import median
import json
M=30030
def positions():return [x for x in range(M) if all(gcd(x+h,M)==1 for h in (0,2,6))]
class Delta:
def __init__(self,xs,steps):
self.dir=bytearray();self.payload=bytearray();i=0
while i<len(xs):