| 185 | |
| 186 | template<typename dist_t> |
| 187 | class AlgorithmInterface { |
| 188 | public: |
| 189 | virtual void addPoint(const void *datapoint, labeltype label, bool replace_deleted = false) = 0; |
| 190 | |
| 191 | virtual std::priority_queue<std::pair<dist_t, labeltype>> |
| 192 | searchKnn(const void*, size_t, BaseFilterFunctor* isIdAllowed = nullptr) const = 0; |
| 193 | |
| 194 | // Return k nearest neighbor in the order of closer fist |
| 195 | virtual std::vector<std::pair<dist_t, labeltype>> |
| 196 | searchKnnCloserFirst(const void* query_data, size_t k, BaseFilterFunctor* isIdAllowed = nullptr) const; |
| 197 | |
| 198 | virtual void saveIndex(const std::string &location) = 0; |
| 199 | virtual ~AlgorithmInterface(){ |
| 200 | } |
| 201 | }; |
| 202 | |
| 203 | template<typename dist_t> |
| 204 | std::vector<std::pair<dist_t, labeltype>> |
nothing calls this directly
no outgoing calls
no test coverage detected