-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A* Star is problematic when working with SimpleWeightedGraph #48
Comments
Good catch! |
One solution might be to call |
thanks for the prompt reply! unfortunately it does not work, feels Graphs.jl needs to be changed in order to pass the function instead of the |
Well then you need to do the post processing yourself to re-assign the weights to the returned edges. Think of the result of A* as an unweighted path |
yeah I have a post process already, just want to flag it as a potential bug, or caveat as you call it |
If you want to contribute a PR explaining this in the docs of |
Fixed it in Graphs.jl |
The MWE is modified from the test:
and the return does not match the actual edge weight
Querying the weight using
SimpleWeightedGraphs.weight
on the vector returned bya_star
would give the default weight1.0
, which can be observed by runningSimpleWeightedGraphs.weight(a_star(g, 1, 3)[1]) == 1.0
.The text was updated successfully, but these errors were encountered: