Analyzes how the number of geodesics scales with radius for each grid vertex. This function helps determine if collapsing/clustering geodesics is necessary and provides insights into the graph structure around grid vertices.
Usage
compute.geodesic.stats(
adj.list,
length.list,
min.radius = 0.2,
max.radius = 0.5,
n.steps = 5,
n.packing.vertices = length(adj.list),
max.packing.iterations = 20,
packing.precision = 1e-04,
verbose = FALSE
)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.
- 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.
- max.packing.iterations
Integer. Maximum iterations for packing algorithm.
- packing.precision
Numeric. Precision parameter for packing algorithm.
- verbose
Logical. Whether to print progress information.
Value
A list of class "geodesic_stats" containing:
- radii
Numeric vector. Actual radii used in the analysis.
- geodesic_rays
Matrix. Number of geodesic rays for each vertex at each radius.
- composite_geodesics
Matrix. Number of composite geodesics for each vertex at each radius.
- path_overlap
List of matrices. Overlap statistics for each vertex at each radius.
- grid_vertices
Integer vector. The vertices selected as grid vertices.
- summary
Data frame. Summary statistics for each radius.
Examples
graph <- create.graph("circle", n = 8, sampling = "uniform")
stats <- compute.geodesic.stats(graph.adjacency(graph), graph.lengths(graph), min.radius = 0.3,
max.radius = 0.5, n.steps = 2, n.packing.vertices = 4)
stats$summary
#> radius min_rays avg_rays median_rays max_rays avg_composite
#> 1 0.9424778 2 2 2 2 1
#> 2 1.5707963 2 2 2 2 1
#> median_composite max_composite avg_overlap_median composite_ratio
#> 1 1 1 0 1
#> 2 1 1 0 1