Path: use the actual values instead of absolute values when calculating distance
This commit is contained in:
committed by
Yorik van Havre
parent
2c862f0f72
commit
6fbeead3fb
@@ -526,7 +526,7 @@ def sort_jobs(locations, keys, attractors=[]):
|
||||
""" square Euclidean distance """
|
||||
d = 0
|
||||
for k in keys:
|
||||
d += (abs(a[k]) - abs(b[k])) ** 2
|
||||
d += (a[k] - b[k]) ** 2
|
||||
|
||||
return d
|
||||
|
||||
|
||||
Reference in New Issue
Block a user