Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Use array of concrete eltype for efficiency in astar #1585

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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