Skip to contents

Geodesic Disk in a Weighted Graph

Usage

geodesic.disk(adj.list, length.list, center.vertex, radius = NULL, n = NULL)

Arguments

adj.list

Adjacency list.

length.list

Edge-length list aligned with adj.list.

center.vertex

Center vertex.

radius

Optional geodesic radius.

n

Optional target number of reachable vertices.

Value

List with vertices, effective radius, and aligned dists.

Examples

graph <- list(2L, c(1L, 3L), 2L)
weights <- list(1, c(1, 2), 2)
geodesic.disk(graph, weights, center.vertex = 2, radius = 2)
#> $vertices
#> [1] 2 1 3
#> 
#> $radius
#> [1] 2
#> 
#> $dists
#> 2 1 3 
#> 0 1 2 
#>