From 28681fc1ab300ed588b5907d6e3b5a2ffb0b02a4 Mon Sep 17 00:00:00 2001 From: Kishore Nallan Date: Sat, 14 Jan 2023 15:37:10 +0530 Subject: [PATCH] Getters for max elements, element count and num deleted. (#431) --- hnswlib/hnswalg.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/hnswlib/hnswalg.h b/hnswlib/hnswalg.h index 7f34e62b..d1597400 100644 --- a/hnswlib/hnswalg.h +++ b/hnswlib/hnswalg.h @@ -196,6 +196,17 @@ class HierarchicalNSW : public AlgorithmInterface { return (int) r; } + size_t getMaxElements() { + return max_elements_; + } + + size_t getCurrentElementCount() { + return cur_element_count; + } + + size_t getDeletedCount() { + return num_deleted_; + } std::priority_queue, std::vector>, CompareByFirst> searchBaseLayer(tableint ep_id, const void *data_point, int layer) {