GetNTotal

API definition

virtual int GetNTotal() const = 0;

Function

Queries the maximum space occupied by feature vectors in the current database.

Feature vectors are inserted from the index 0. If indices of inserted feature vectors is consecutive, ntotal is equal to the number of feature vectors. Otherwise, ntotal is equal to the maximum index of the inserted vector plus 1. (Due to performance concerns, the operator performs bulk memory operations. By default, the maximum value of the index position and the previous space are considered valid base vectors and included in the computing process.) Users need to call this API to obtain the total base vectors recorded in the index and allocate corresponding memory space to functional APIs for parameter pass. For details, see the description of specific APIs.

Input

N/A

Output

N/A

Return value

int ntotal: For details, see Function in the table.

Restrictions

N/A