Skip to content

Commit

Permalink
Updated A* algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
nagajaideep committed Feb 3, 2025
1 parent 47e8368 commit d72bf9d
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions pydatastructs/graphs/algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -753,13 +753,6 @@ def shortest_paths(graph: Graph, algorithm: str,
raise_if_backend_is_not_python(
shortest_paths, kwargs.get('backend', Backend.PYTHON))
import pydatastructs.graphs.algorithms as algorithms
if algorithm == 'a_star_with_manhattan':
# A* with this implementation requires both source and target
if not target:
raise ValueError("Target must be specified for A* algorithm")

func = "_a_star_with_manhattan_" + graph._impl
return getattr(algorithms, func)(graph, source, target)
func = "_" + algorithm + "_" + graph._impl
if not hasattr(algorithms, func):
raise NotImplementedError(
Expand Down

0 comments on commit d72bf9d

Please sign in to comment.