Open henrik-wolf opened 3 years ago
The problem is that with E = edgetype(g) in reconstruct_path!
, the full type parameters are used, but that's more specific than SimpleWeightedEdge(x, y)
.
A fix would be to define SimpleWeightedGraphs.SimpleWeightedEdge{T, U}(x::T, y::T) where T<:Integer where U<:Real = SimpleWeightedEdge(x, y, one(U))
.
I was trying to calculate the distance between two nodes using the A* algorithm implemented in LightGraphs. For example
throws an error:
So far I have worked out, that the problem arises, when the a_star algorithm tries to call the constructor of the SimpleWeightedEdge type in the a_start.jl file. I would have believed that the definition of
in line 18 of simpleweightededge.jl would exactly match this case. Am I missing something, or is this a bug?