UNPKG

ravendb

Version:
20 lines 877 B
export declare class VectorQuantizer { /** * Converts a float array to an int8 array. * Finds the maximum absolute value and scales all values to fit in int8 range (-127 to 127). * Appends the maximum absolute value as a float at the end. * * @param rawEmbedding The float array to convert * @returns A new array with the quantized values */ static toInt8(rawEmbedding: number[] | Float32Array): number[]; /** * Converts a float array to a binary representation where each value is represented by 1 bit. * 1 if the value is non-negative, 0 if negative. Packs 8 values per byte. * * @param rawEmbedding The float array to convert * @returns A new array with the binary-packed values */ static toInt1(rawEmbedding: number[] | Float32Array): number[]; } //# sourceMappingURL=VectorQuantizer.d.ts.map