Closed
Description
When using A* I was attempting to use a heuristic function that return a float, but the default weights of the graph were ints.
Here is the example
using Graphs, LinearAlgebra, Random
Random.seed!(0)
xyz = rand(4000, 3)
g = random_regular_graph(4000, 4)
src = rand(1:4000)
dst = rand(1:4000)
h(v) = Int(round(norm(xyz[v, :] - xyz[dst, :])))
edges = a_star(g, src, dst, weights(g), h)
# The above works since I convert to int, below does not, I get InexactError: Int64(1.7553136893610342)
h(v) = norm(xyz[v, :] - xyz[dst, :])
edges = a_star(g, src, dst, weights(g), h)