From 59f5ae7f03a017944425947c1253d34b8824b8c5 Mon Sep 17 00:00:00 2001 From: xiejianqiao Date: Mon, 20 Jan 2020 15:18:10 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix=EF=BC=8Coverflow=20in=20getIdsList?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- python_bindings/bindings.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python_bindings/bindings.cpp b/python_bindings/bindings.cpp index 9c90fa45..ef1dc1d6 100644 --- a/python_bindings/bindings.cpp +++ b/python_bindings/bindings.cpp @@ -244,9 +244,9 @@ class Index { return data; } - std::vector getIdsList() { + std::vector getIdsList() { - std::vector ids; + std::vector ids; for(auto kv : appr_alg->label_lookup_) { ids.push_back(kv.first); From 4efa0c8362a8794fcb2f3c50dc73353e3fbd738f Mon Sep 17 00:00:00 2001 From: Hussama Ismail Date: Wed, 12 Feb 2020 21:17:16 +0100 Subject: [PATCH 2/3] include one more other implementation --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 31c41564..fb3897f8 100644 --- a/README.md +++ b/README.md @@ -197,6 +197,7 @@ https://github.com/dbaranchuk/ivf-hnsw * Go implementation: https://github.com/Bithack/go-hnsw * Python implementation (as a part of the clustering code by by Matteo Dell'Amico): https://github.com/matteodellamico/flexible-clustering * Java implementation: https://github.com/jelmerk/hnswlib +* Java bindings using Java Native Access: https://github.com/stepstone-tech/hnswlib-jna * .Net implementation: https://github.com/microsoft/HNSW.Net ### Contributing to the repository From aefeaec43f23b7e8fef8ec26dfccd056941fdd01 Mon Sep 17 00:00:00 2001 From: Yury Malkov Date: Tue, 3 Mar 2020 22:17:28 -0800 Subject: [PATCH 3/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fb3897f8..c79e24c1 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ Index methods: * `set_num_threads(num_threads)` set the default number of cpu threads used during data insertion/querying. -* `get_items(ids)` - returns a numpy array (shape:`N*dim`) of vectors that have integer identifiers specified in `ids` numpy vector (shape:`N`). +* `get_items(ids)` - returns a numpy array (shape:`N*dim`) of vectors that have integer identifiers specified in `ids` numpy vector (shape:`N`). Note that for cosine similarity it currently returns **normalized** vectors. * `get_ids_list()` - returns a list of all elements' ids.