scalarQuantize
fun scalarQuantize(vector: FloatArray, destination: ByteArray, bits: Byte, centroid: FloatArray): OptimizedScalarQuantizer.QuantizationResult
Quantize the vector to the given bit level.
Return
quantization result
Parameters
vector
raw vector
destination
destination to store the quantized vector
bits
number of bits to quantize the vector
centroid
centroid to center the vector