Equivalent function to RcppAnnoy's a$getItemsVector(i) · Issue #18 · jlmelville/rcpphnsw (original) (raw)

@d4tum the master branch now contains an implementation of the getItems method. If you want to get back a matrix containing the first and tenth vectors that were added to the index, call e.g. ann$getItems(c(1, 10)).

I have not yet parallelized this function so it might be slow if returning large number of vectors.

Also, the hnsw library has recently had some stability issues with valgrind failures, other memory problems or compiler warnings, all of which prevent me from submitting a new version of the library to CRAN. I was hoping there would be a clean release of the library, because I really don't want to maintain a separate patched version of it internally to this package. I may take that step (or see what scope there is for submitting some more fixes upstream), but for now there is not likely to be an imminent CRAN submission.