scalarQuantize

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