@@ -744,7 +744,7 @@ def shortest_paths(graph: Graph, algorithm: str,
744744 >>> G2 = Graph(start, middle, goal)
745745 >>> G2.add_edge('0,0', '1,1', 2)
746746 >>> G2.add_edge('1,1', '2,2', 2)
747- >>> shortest_paths(G2, 'A_star ', '0,0', '2,2')
747+ >>> shortest_paths(G2, 'a_star ', '0,0', '2,2')
748748 (4, {'0,0': None, '1,1': '0,0', '2,2': '1,1'})
749749 References
750750 ==========
@@ -756,7 +756,7 @@ def shortest_paths(graph: Graph, algorithm: str,
756756 raise_if_backend_is_not_python (
757757 shortest_paths , kwargs .get ('backend' , Backend .PYTHON ))
758758 import pydatastructs .graphs .algorithms as algorithms
759- func = "_" + algorithm + "_" + graph ._impl
759+ func = "_" + algorithm . lower () + "_" + graph ._impl
760760 if not hasattr (algorithms , func ):
761761 raise NotImplementedError (
762762 "Currently %s algorithm isn't implemented for "
@@ -824,7 +824,6 @@ def _dijkstra_adjacency_list(graph: Graph, start: str, target: str):
824824def _a_star_adjacency_list (graph : Graph , source : str , target : str ) -> tuple :
825825 """
826826 A* pathfinding algorithm implementation similar to Dijkstra's structure.
827-
828827 Parameters
829828 ==========
830829 graph: Graph
@@ -833,7 +832,6 @@ def _a_star_adjacency_list(graph: Graph, source: str, target: str) -> tuple:
833832 Starting node name
834833 target: str
835834 Target node name
836-
837835 Returns
838836 =======
839837 (distance, predecessors): tuple
0 commit comments