GetFeatures

API Definition

APP_ERROR GetFeatures(int n, float16_t *features, const idx_t *indices) override

Function

Queries n feature vectors with specified subscript indexes.

Input

int n: number of vectors to be obtained in the base library.

const idx_t *indices: index values corresponding to n vectors to be obtained in the base library.

Output

float16_t *features: The length of the feature vectors corresponding to the subscript indexes is n x vector dimension dim.

Return Value

APP_ERROR: return status. For details, see Return Code Reference.

Restrictions

  • indices: The index range of each feature is [0, ntotal). ntotal can be obtained through the GetNTotal API.
  • n: The value range is [0, capacity].