Description Usage Arguments Details Value Examples
dijkstra
takes a graph and an initial node and calculates the shortest path from the
initial node to every other node in the graph.
1 | dijkstra(graph, init_node)
|
graph |
Must be a data frame with three variables (v1, v2, w) |
init_node |
Must be numeric scalar or integer |
https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm
The shortest path from the initial node to every other node
1 2 | dijkstra(wiki_graph, 1)
dijkstra(wiki_graph, 3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.