            for j in range(0, self.numCluster):
                self.distances[i][j] = math.sqrt((self.xData[i] - self.centerXCoords[j])**2 + (self.yData[i] - self.centerYCoords[j])**2)
     
    def calcCenters(self):
        """Calculates the locations of the cluster centers"""
        self.centerXCoords = [0] * self.numCluster;
        self.centerYCoords = [0] * self.numCluster;
        
        for j in range(0, self.numCluster):
            denominator = 0.0
            for i in range(0, len(self.xData)):