Skip to content

Commit

Permalink
Update DistUtils.cpp
Browse files Browse the repository at this point in the history
GeoDaCenter#1751 (socio-weights creation) when "manhanttan distance" is selected, the bandwidth is computed with square root, which is not correct and should only be applied when "Euclidean distance" is selected
  • Loading branch information
lixun910 committed Jan 16, 2019
1 parent aaf5604 commit 8cfdb63
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Weights/DistUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ double DistUtils::GetMinThreshold()
}
delete[] nnIdx;
delete[] dists;


if (ANN_DIST_TYPE == 1) return max_1nn_dist;
return sqrt(max_1nn_dist);
}

Expand Down

0 comments on commit 8cfdb63

Please sign in to comment.