Description Usage Arguments Value References
Implementation of Djikstra's algorithm to find the shortest path to all nodes from an initial node using an adjacency matrix
1 | dijkstra(graph, init_node)
|
graph |
A data frame with three variables that contain same-sized vectors describing nodes, edges and wieghts of a graph |
init_node |
The node from which the shortest distance to all other nodes is calculated |
A vector of the distances from init_node to all other nodes
https://en.wikipedia.org/wiki/Dijkstras_algorithm and https://www.youtube.com/watch?v=Ww4nU_NcAIQ
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.