MCPcopy Create free account
hub / github.com/RocketMap/RocketMap / simulate_centroid

Method simulate_centroid

Tools/Spawnpoint-Clustering/cluster.py:64–68  ·  view source on GitHub ↗
(self, spawnpoint)

Source from the content-addressed store, hash-verified

62 self.max_time = spawnpoint.time
63
64 def simulate_centroid(self, spawnpoint):
65 f = len(self._spawnpoints) / (len(self._spawnpoints) + 1.0)
66 new_centroid = utils.intermediate_point(spawnpoint.position, self.centroid, f)
67
68 return new_centroid
69
70def cost(spawnpoint, cluster, time_threshold):
71 distance = utils.distance(spawnpoint.position, cluster.centroid)

Callers 1

check_clusterFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected