// find in which bucket a key is (just basic modulo) int get_key(const Key &K) { if(BUFFER) return BUFFER[K.index]; int k = E->extract(K); k %= N; if(k < 0) k += N; return k; }
int extract(const Key &K) { int v1 = E1->extract(K); int v2 = E2->extract(K); return A1*(v1/d1) + A2*(v2/d2); }