GetPQDistance
API definition |
int GetPQDistance(const uint8_t *basecode, const DiskPQParams *params, const float *pqDistanceTable, float &pqDistance); |
|---|---|
Function |
Calculates the PQ distance between a query and a base vector based on the compressed code pointed to by basecode and pqDistanceTable obtained via the GetPQDistanceTable API. |
Input |
const uint8_t *basecode: pointer to the compressed code for one base vector. const DiskPQParams *params: pointer to a DiskPQParams instance with the pqChunks value populated. It cannot be a null pointer. const float *pqDistanceTable: pointer to the ADC PQ distance table corresponding to the query. |
Output |
float &pqDistance: reference value of the final PQ distance. |
Return value |
int: The return value 0 indicates a normal process; and -1 indicates an abnormal process, with error details output to cerr. |
Restrictions |
|