我要评分
获取效率
正确性
完整性
易理解

GetPQDistanceTableSdc

API Definition

int GetPQDistanceTableSdc(const PQParams *params, float *pqDistanceTable, size_t pqDistanceTable_size);

Function

Calculates the PQ SDC distance table, that is, calculates the distance between the cluster centroids in each subspace.

Parameters

Parameter

Data Type

Description

Value Range

pqDistanceTable

float*

SDC distance table. It can also be used as an output value.

The value cannot be null. The value is specified by pqDistanceTable_size, the length of the SDC distance table array.

pqDistanceTable_size

size_t

Length of the SDC distance table array.

The value is specified by pqM × pqKsub × pqKsub, where pqM and pqKsub are fields in the PQParams structure, respectively indicating the number of subspaces and the number of cluster centroids in these subspaces.

params

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.