Skip to content

Commit

Permalink
Merge pull request #14 from jlapeyre/astar-efficiency
Browse files Browse the repository at this point in the history
  • Loading branch information
jpfairbanks committed Oct 22, 2021
2 parents 768c260 + 80ddf65 commit 9039378
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shortestpaths/astar.jl
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function a_star(g::AbstractGraph{U}, # the g
f_score = fill(Inf, nv(g))
f_score[s] = heuristic(s)

came_from = -ones(Integer, nv(g))
came_from = fill(-one(s), nv(g))
came_from[s] = s

a_star_impl!(g, t, open_set, closed_set, g_score, f_score, came_from, distmx, heuristic)
Expand Down

0 comments on commit 9039378

Please sign in to comment.