Description Usage Arguments Details Examples
Use Dijkstra's algorithm to solve a shortest path problem.
1 | dijkstra(graph, from, to)
|
graph |
The graph object. |
from |
The source vertex |
to |
The target vertex |
Dijkstra is a single-source algorithm which cannot deal with negative edge weights.
Technically, it is a special case of A*-Search (aStarSearch
) where the heuristic function is zero.
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.