beam_search.py 文件源码

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

项目:Skeleton-key 作者: feiyu1990 项目源码 文件源码
def push(self, x):
        """Pushes a new element."""
        assert self._data is not None
        if len(self._data) < self._n:
            heapq.heappush(self._data, x)
        else:
            heapq.heappushpop(self._data, x)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号