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

add

API Definition

def add(nb:int, xb: numpy.ndarray, consecutive: int, reorder: int, level: int) -> int

Function

Builds a graph index.

Parameters

Parameter

Data Type

Description

Value Range

nb

int

Data volume of the vector base library.

≥ 1. It is recommended that the value be less than 1 billion.

xb

numpy.ndarray

Data of the vector base library.

The value cannot be null. The expected length is nb × dim (Data volume × Feature dimension).

consecutive

int

Block size.

[1, 31]

reorder

int

Indicates whether to enable base library vector reordering.

0 or 1.

level

int

Quantization level.

[0, 3]

  • 0: FP32 quantization.
  • 1: SQ8U quantization.
  • 2: SQ4U quantization.
  • 3: FP16 quantization.

Return Value

Data Type

Description

int

This API is a wrapper for an underlying C++ API, which controls exception handling.