self.corridor_graph.node[node]["distances"] = nx.single_source_dijkstra_path_length(self.corridor_graph, node, weight="weight")# Using the nearest neighbour tree. For each grid block, which is 1m x 1m, what is the closest node.self.lookup = [[Noneforyinrange(self.level.height)]forxin...
# 需要導入模塊: import networkx [as 別名]# 或者: from networkx importsingle_source_dijkstra_path_length[as 別名]deftest_absent_source(self):# the check is in _dijkstra_multisource, but this will provide# regression testing against later changes to any of the "client"# Dijkstra or Bellman-...