Skip to content

Commit

Permalink
remove index bug
Browse files Browse the repository at this point in the history
  • Loading branch information
dengcai78 committed Jan 16, 2018
1 parent 89487e2 commit c61b39e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/index_nsg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,11 @@ void IndexNSG::Build(size_t n, const float *data, const Parameters &parameters)
avg /= nd_;
std::cout << max << ":" << avg << ":" << min << ":" << cnt << "\n";
tree_grow(parameters);
max = 0;
for (unsigned i = 0; i < nd_; i++) {
max = max < final_graph_[i].size() ? final_graph_[i].size() : max;
}
if(max > width)width = max;
has_built = true;
}

Expand Down

0 comments on commit c61b39e

Please sign in to comment.