bst.py 文件源码

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

项目:bst 作者: mhb8898 项目源码 文件源码
def plot(self):
        # print(list(self.root.edge_list()))
        labels = {}
        for i, j in self.root.edge_list():
            labels[i] = i
            labels[j] = j
        G = nx.Graph(self.root.edge_list())
        pos = graphviz_layout(G, prog='dot')

        nx.draw(G, pos)

        nx.draw_networkx_labels(G, pos, labels)

        plt.show()

# class BST_count(BST):
#     def __init__(self, url=None, file=None,tree=None):
#         if tree:
#             pass
#         else:
#             super(BST).__init__(url,file)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号