aborescene_synthesis.py 文件源码

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

项目:NetPower_TestBed 作者: Vignesh2208 项目源码 文件源码
def compute_shortest_path_tree(self, dst_sw):

        spt = nx.DiGraph()

        mdg = self.network_graph.get_mdg()

        paths = nx.shortest_path(mdg, source=dst_sw.node_id)

        for src in paths:

            if src == dst_sw.node_id:
                continue

            for i in range(len(paths[src]) - 1):
                spt.add_edge(paths[src][i], paths[src][i+1])

        return spt
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号