Example #1
0
	def getNodeNChildNodeDistance(self, neighbors, neighborsList, location, n):
		if (n.visited):
			return neighborsList
		else:

			distance = Distance.distance_on_unit_sphere(float(location[0]), float(location[1]), float(n.location[0]), float(n.location[1]))  * 3960
			n.visited = True
			
			if len(neighborsList) < neighbors:
				neighborsList[n.locationid] = distance
			else:
				neighborsList = self.getNearestNeighbors( neighborsList, distance, n)
			return neighborsList