1

I am using A* Algorithm to calculate the shortest path. The route was calculated based on the junction. Shortest route was calculated when there was two or more junction in between source and destination, but the route was not calculated when source and destination having same junction or without having junction.

1

I think this is the expected behaviour. Consider that if there is no edge between the source node and destination node, what could the route (list of edges) possibly be?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.