Description Usage Arguments Value Examples
Based on floyd
function. If the graph is sparse,
floyd
seems to use the Johnson algorithm rather than
more complex Floyd-Warhall algorithm. C++ code difficult to understand:
https://github.com/cran/Rfast/blob/master/src/floyd_john.cpp. Adpated to
Directed Acyclic graph, Floyd-Warshall algorithm is used to apply transitive
closures.
1 | floydAlgo(x)
|
x |
An igraph object or a matrix. Matrix values represent the edges cost values. If igraph object, it is automatically converted to adjacency matrix. |
A matrix m where he elements denote the length of the shortest path between each pair of points. m[i, j] is zero it means there is not any path from i to j, or a cost of 0.
1 2 3 4 5 6 7 8 9 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.