Companion

object Companion

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun discretize(value: Int, bucket: Int): Int
Link copied to clipboard
fun packAsBinary(vector: ByteArray, packed: ByteArray)

Pack the vector as a binary array.

Link copied to clipboard
fun transposeHalfByte(q: ByteArray, quantQueryByte: ByteArray)

Transpose the query vector into a byte array allowing for efficient bitwise operations with the index bit vectors. The idea here is to organize the query vector bits such that the first bit of every dimension is in the first set dimensions bits, or (dimensions/8) bytes. The second, third, and fourth bits are in the second, third, and fourth set of dimensions bits, respectively. This allows for direct bitwise comparisons with the stored index vectors through summing the bitwise results with the relative required bit shifts.