Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Clustering-Ozone-EU-Data/dataPointClass.py
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
23 lines (19 sloc)
620 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
class DataPoint: | |
def __init__(self, lat, lon, ozone): | |
self.lat = lat | |
self.lon = lon | |
self.ozone = ozone | |
self.centroid = None | |
#this is big number, bigger than any distance ever | |
self.centroidD = sys.maxsize | |
def setCentroid(self, centroid, centroidD): | |
self.centroid = centroid | |
self.centroidD = centroidD | |
class Centroid(DataPoint): | |
def __init__(self, lat, lon, ozone): | |
super().__init__(lat, lon, ozone) | |
self.myPoints = [] | |
self.changed = False | |
def addPoint(self, point): | |
self.myPoints.append(point) |