(self, X, **sink)
| 268 | return lut |
| 269 | |
| 270 | def encode_X(self, X, **sink): |
| 271 | if self.algo == 'OPQ': |
| 272 | X = pq.opq_rotate(X, self.R) |
| 273 | elif self.algo == 'Bolt': |
| 274 | X = pq.bopq_rotate(X, self.rotations) |
| 275 | |
| 276 | idxs = pq._encode_X_pq(X, codebooks=self.centroids) |
| 277 | |
| 278 | return idxs + self.offsets # offsets let us index into raveled dists |
| 279 | |
| 280 | def fit_query(self, q, quantize=True, **sink): |
| 281 | quantize = quantize and self.quantize_lut |
nothing calls this directly
no outgoing calls
no test coverage detected