From 8cfdb63b5480b8b6f81d608cbaa6b047f5634f32 Mon Sep 17 00:00:00 2001 From: Xun Li Date: Wed, 16 Jan 2019 10:23:25 -0700 Subject: [PATCH] Update DistUtils.cpp #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 --- Weights/DistUtils.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Weights/DistUtils.cpp b/Weights/DistUtils.cpp index e79f299c5..bbd28f82c 100644 --- a/Weights/DistUtils.cpp +++ b/Weights/DistUtils.cpp @@ -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); }