MCPcopy Create free account
hub / github.com/VectorDB-NTU/RaBitQ-Library / AlgorithmInterface

Class AlgorithmInterface

include/rabitqlib/third/hnswlib/hnswlib.h:187–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185
186template<typename dist_t>
187class 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
203template<typename dist_t>
204std::vector<std::pair<dist_t, labeltype>>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected