def update(self, pointvol):
"""Update the N-sphere radii using the current set of live points."""
# Initialize a K-D Tree to assist nearest neighbor searches.
kdtree = spatial.KDTree(self.live_u)
# Check if we should use the provided pool for updating.
if self.use_pool_update:
pool = self.pool
else:
pool = None
# Update the N-spheres.
self.radfriends.update(self.live_u, pointvol=pointvol,
rstate=self.rstate, bootstrap=self.bootstrap,
pool=pool, kdtree=kdtree)
if self.enlarge != 1.:
self.radfriends.scale_to_vol(self.radfriends.vol_ball *
self.enlarge)
return copy.deepcopy(self.radfriends)
评论列表
文章目录