Skip to content

Commit

Permalink
Update DistUtils.cpp
Browse files Browse the repository at this point in the history
fix an issue when get estimated max threshold value
  • Loading branch information
lixun910 committed Nov 30, 2018
1 parent 46b308c commit 9aacabe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Weights/DistUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ double DistUtils::GetMaxThreshold()
ANNdistArray dists = new ANNdist[k];
for (size_t i=0; i<n_iter; i++) {
x_idx = rand() % n_rows;
kdTree->annkSearch(data[i], k, nnIdx, dists);
kdTree->annkSearch(data[x_idx], k, nnIdx, dists);
y_idx = nnIdx[k-1];
kdTree->annkSearch(data[y_idx], k, nnIdx, dists);
if (dists[k-1] > dist_cand) {
Expand Down

0 comments on commit 9aacabe

Please sign in to comment.