GetNTotal
API Definition |
virtual int GetNTotal() const = 0 |
|---|---|
Function |
Queries the maximum space occupied by feature vectors in the current library. 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 value of the inserted vector plus 1. (Due to performance concerns, the operator perform a batch operation on the memory. By default, the maximum value of the index position and the previous space are considered valid base library vectors and included in the computing process.) Users need to call this API to obtain the total capacity of the base library recorded in the index and allocate corresponding memory space to function APIs for parameter pass. For details, see the description of specific APIs. |
Input |
N/A |
Output |
int ntotal: maximum index of the base library vector plus 1. For details, see Function in the table. |
Return Value |
int ntotal: For details, see Function in the table. |
Restrictions |
N/A |