Unverified Commit 012954eb authored by Lucas Hosseini's avatar Lucas Hosseini Committed by GitHub

Fix HNSW.fill_with_random_links. (#801)

parent 0a8f92d6
...@@ -173,7 +173,7 @@ void HNSW::fill_with_random_links(size_t n) ...@@ -173,7 +173,7 @@ void HNSW::fill_with_random_links(size_t n)
int max_level = prepare_level_tab(n); int max_level = prepare_level_tab(n);
RandomGenerator rng2(456); RandomGenerator rng2(456);
for (int level = max_level - 1; level >= 0; level++) { for (int level = max_level - 1; level >= 0; --level) {
std::vector<int> elts; std::vector<int> elts;
for (int i = 0; i < n; i++) { for (int i = 0; i < n; i++) {
if (levels[i] > level) { if (levels[i] > level) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment