Rate This Document
Findability
Accuracy
Completeness
Readability

ComputeVectorPQCode

API Definition

int ComputeVectorPQCode(float *vector, const PQParams *params, unsigned char *pqCode);

Function

Quantizes the input vector based on the PQ codebook.

Parameters

Parameter

Description

Data Type

Value Range

vector

Original vector.

float *

The value cannot be null.

pqCode

Quantized vector. It can also be used as an output value.

unsigned char *

The value cannot be null.

PQParams

For details, see the description of PQParams in Structure Description.

Return Value

Data Type

Description

int

The value 0 is returned when the system runs properly, and the value −1 is returned when the system exits abnormally.