You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
3nar/code/point.py

16 lines
361 B

import numpy as np
class Point:
def __init__(self, coord, value):
self.coord = coord
self.value = value
def setvalue(self, value):
self.value = value
def getDist(self, point):
return np.linalg.norm(self.coord - point.coord)
def getDistFromCoord(self, coord):
return np.linalg.norm(self.coord - coord)