dijkstra | R Documentation |
Implement the Dijkstra's algorithm to find the shortest paths from the source node to all nodes in the given network.
dijkstra(adjmat, src)
adjmat |
The adjacency matrix of a directed, weighted network. |
src |
An integer specifying the given source node to find the shortest distance. |
A list of distance and previous node.
Dijkstra, E. W. (1959). A Note on Two Problems in Connexion with Graphs. Numerische Mathematik, 1, 269–271.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.