Compute a Weighted Shortest-Path Distance
Usage
compute.graph.distance(graph, i, j, stage = "final")
Arguments
- graph
A dgraph with stored lengths.
- i
Source vertex.
- j
Target vertex.
- stage
Stored graph stage.
Value
Numeric shortest-path distance.
Examples
graph <- list(2L, c(1L, 3L), 2L)
weights <- list(1, c(1, 2), 2)
compute.graph.distance(i = 1, j = 3, graph = dgraph(graph, weights))
#> [1] 3