def test_floyd_warshall_parallel(self): """ The following test checks the parallel Floyd Warshall's APSP algorithm. """ g = ParallelGeneralGraph() g.load("tests/TOY_graph.csv") g.num = mp.cpu_count() shpath, shpath_len = g.floyd_warshall_predecessor_and_distance() self.check_shortest_paths(self, self.initial, shpath, shpath_len)
def test_Dijkstra_parallel(self): """ The following test checks the parallel SSSP algorithm based on Dijkstra's method. """ g = ParallelGeneralGraph() g.load("tests/TOY_graph.csv") g.num = mp.cpu_count() shpath, shpath_len = g.dijkstra_single_source_shortest_path() self.check_shortest_paths(self, self.initial, shpath, shpath_len)