assign
API定义  | 
void assign(idx_t n, const int8_t *x, idx_t *labels, idx_t k = 1);  | 
|---|---|
功能描述  | 
实现AscendIndexInt8特征向量查询接口,根据输入的特征向量返回最相似的“k”条特征的ID。  | 
输入  | 
idx_t n:查询的特征向量的条数。 const int8_t *x:特征向量数据。 idx_t k:需要返回的最近似的结果的个数。  | 
输出  | 
idx_t *labels:查询的距离最近的前“k”个向量的ID。  | 
返回值  | 
无。  | 
约束说明  | 
  | 
父主题: AscendIndexInt8