Skip to content

Commit 28681fc

Browse files
authored
Getters for max elements, element count and num deleted. (nmslib#431)
1 parent 3e006ea commit 28681fc

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

hnswlib/hnswalg.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,17 @@ class HierarchicalNSW : public AlgorithmInterface<dist_t> {
196196
return (int) r;
197197
}
198198

199+
size_t getMaxElements() {
200+
return max_elements_;
201+
}
202+
203+
size_t getCurrentElementCount() {
204+
return cur_element_count;
205+
}
206+
207+
size_t getDeletedCount() {
208+
return num_deleted_;
209+
}
199210

200211
std::priority_queue<std::pair<dist_t, tableint>, std::vector<std::pair<dist_t, tableint>>, CompareByFirst>
201212
searchBaseLayer(tableint ep_id, const void *data_point, int layer) {

0 commit comments

Comments
 (0)