io
This commit is contained in:
parent
ddaa40f649
commit
d66374479f
1 changed files with 1 additions and 1 deletions
|
@ -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))
|
||||||
|
|
Reference in a new issue