astar_path
Swap
Enter search terms or a module, class or function name.
Return the length of the shortest path between source and target using the A* (“A-star”) algorithm.
G : NetworkX graph
source : node
Starting node for path
target : node
Ending node for path
heuristic : function
A function to evaluate the estimate of the distance from the a node to the target. The function takes two nodes arguments and must return a number.
NetworkXNoPath :
If no path exists between source and target.
See also