25
25
'topological_sort' ,
26
26
'topological_sort_parallel' ,
27
27
'max_flow'
28
- 'a_star_with_manhattan '
28
+ '_a_star_with_manhattan_adjacency_list '
29
29
]
30
30
31
31
Stack = Queue = deque
@@ -743,10 +743,6 @@ def shortest_paths(graph: Graph, algorithm: str,
743
743
>>> grid_graph.add_edge('0,0', '1,1', 2)
744
744
>>> shortest_paths(grid_graph, 'a_star_with_manhattan', '0,0', '1,1')
745
745
(2, {'1,1': '0,0'})
746
- <<<<<<< HEAD
747
- =======
748
-
749
- >>>>>>> main
750
746
References
751
747
==========
752
748
@@ -757,12 +753,6 @@ def shortest_paths(graph: Graph, algorithm: str,
757
753
raise_if_backend_is_not_python (
758
754
shortest_paths , kwargs .get ('backend' , Backend .PYTHON ))
759
755
import pydatastructs .graphs .algorithms as algorithms
760
- if algorithm == 'a_star_with_manhattan' :
761
- if not target :
762
- raise ValueError ("Target must be specified for A* algorithm" )
763
-
764
- func = "_a_star_with_manhattan_adjacency_list"
765
- return getattr (algorithms , func )(graph , source , target )
766
756
func = "_" + algorithm + "_" + graph ._impl
767
757
if not hasattr (algorithms , func ):
768
758
raise NotImplementedError (
0 commit comments