Description Usage Arguments Value Source
The algorithm checks for indices of minimum distance and updates the distance value of its neighbours only if there exists a path from source to current node such that path distance is less than current distance value.
1 | dijkstra(graph, init_node)
|
graph |
A graph represented in the form of data frame with 3 columns namely v1,v2,w which represents starting node values,ending node values,weight of the path. |
init_node |
A source node in the form of scalar from which shortest distance to every node is calculated. |
A vector containing shortest distance from source node to all other nodes.
https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.