Description Usage Arguments Value Examples
dijkstra
calculates the geodesics
from the source node to all other nodes in the graph
1 | dijkstra(A.mat, src)
|
A.mat |
An n x n adjacency matrix. |
src |
A positive integer from 1 to |
Returns a list of dist
and paths
1 2 | A.mat = sim_adjacency(10, weight = c(1, 5))
dijkstra(A.mat, src = 1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.