This commit is contained in:
UmbertoJr 2019-12-13 11:15:50 +01:00
parent ddaa40f649
commit d66374479f

View file

@ -67,7 +67,7 @@ class Instance:
def distance_euc(zi, zj): def distance_euc(zi, zj):
xi, xj = zi[0], zj[0] xi, xj = zi[0], zj[0]
yi, yj = zi[1], zj[1] yi, yj = zi[1], zj[1]
return round(np.sqrt((xi - xj) ** 2 + (yi - yj) ** 2)) return round(np.sqrt((xi - xj) ** 2 + (yi - yj) ** 2), 0)
def create_dist_matrix(self): def create_dist_matrix(self):
self.dist_matrix = np.zeros((self.nPoints, self.nPoints)) self.dist_matrix = np.zeros((self.nPoints, self.nPoints))