octrees.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:diluvian 作者: aschampion 项目源码 文件源码
def __init__(self, leaf_shape, bounds, dtype, populator=None):
        self.leaf_shape = np.asarray(leaf_shape).astype(np.int64)
        self.bounds = (np.asarray(bounds[0], dtype=np.int64),
                       np.asarray(bounds[1], dtype=np.int64))
        self.dtype = np.dtype(dtype)
        self.populator = populator
        ceil_bounds = self.leaf_shape * \
            np.exp2(np.ceil(np.log2((self.bounds[1] - self.bounds[0]) /
                                    self.leaf_shape.astype(np.float64)))).astype(np.int64).max()
        self.root_node = BranchNode(self, (self.bounds[0], self.bounds[0] + ceil_bounds), clip_bound=self.bounds[1])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号