Skip to contents

Analyzes how the number of geodesics scales with radius for a specific grid vertex.

Usage

compute.vertex.geodesic.stats(
  adj.list,
  length.list,
  grid.vertex,
  min.radius = 0.2,
  max.radius = 0.5,
  n.steps = 5,
  n.packing.vertices = length(adj.list),
  packing.precision = 1e-04
)

Arguments

adj.list

List of integer vectors. Each vector contains indices of vertices adjacent to the corresponding vertex. Indices should be 1-based.

length.list

List of numeric vectors. Each vector contains weights of edges corresponding to adjacencies in adj.list.

grid.vertex

Integer. The grid vertex to analyze.

min.radius

Numeric. Minimum radius as a fraction of graph diameter.

max.radius

Numeric. Maximum radius as a fraction of graph diameter.

n.steps

Integer. Number of radius steps to test.

n.packing.vertices

Integer. Number of vertices in the grid/packing.

packing.precision

Numeric. Precision threshold for packing convergence.

Value

A data frame of class "vertex_geodesic_stats" with columns:

radius

Actual radius used.

rays

Number of geodesic rays within radius.

composite_geodesics

Number of composite geodesics.

overlap_min

Minimum overlap ratio.

overlap_p05

5th percentile overlap ratio.

overlap_p25

25th percentile overlap ratio.

overlap_median

Median overlap ratio.

overlap_p75

75th percentile overlap ratio.

overlap_p95

95th percentile overlap ratio.

overlap_max

Maximum overlap ratio.

Examples

graph <- create.graph("circle", n = 8, sampling = "uniform")
compute.vertex.geodesic.stats(graph.adjacency(graph), graph.lengths(graph),
    grid.vertex = 1, min.radius = 0.3,
    max.radius = 0.5, n.steps = 2)
#>      radius rays composite_geodesics overlap_min overlap_p05 overlap_p25
#> 1 0.9424778    2                   1           0           0           0
#> 2 1.5707963    2                   1           0           0           0
#>   overlap_median overlap_p75 overlap_p95 overlap_max potential_pairs
#> 1              0           0           0           0               1
#> 2              0           0           0           0               1
#>   composite_ratio
#> 1               1
#> 2               1