WriteIndex

API definition

APP_ERROR WriteIndex(const std::string& indexPath);

Function

Writes the index structure to a drive, including the feature vectors after compression and dimension reduction, as well as codebook data.

Input

N/A

Output

const std::string& indexPath: path for writing the KMode index.

Return value

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

Restrictions

Ensure that the directory where the indexPath file is located exists and the running user has the write permission on the directory. For security hardening, the directory level cannot contain soft links.

API definition

APP_ERROR WriteIndex(const std::string& aModeIndexPath, const std::string& kModeIndexPath);

Function

Writes the index structure to a drive, including the feature vectors after compression and dimension reduction, as well as codebook data.

Input

N/A

Output

  • const std::string& aModeIndexPath: path for writing the AMode index.
  • const std::string& kModeIndexPath: path for writing the KMode index.

Return value

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

Restrictions

Ensure that the directory where the aModeIndexPath and kModeIndexPath files are located exists and the running user has the write permission on the directory. For security hardening, the directory level cannot contain soft links.