All-pairs geodesic distance matrix (chunked)
Arguments
- geometry
SurfaceGeometry,LabeledNeuroSurface,NeuroSurface, or anigraph.- vertices
Optional integer vector of source vertices. Defaults to all vertices.
- targets
Optional integer vector of target vertices. Defaults to
vertices(square matrix).- weights
Optional numeric edge weights (defaults to
E(g)$dist).- mode
Output mode:
"sparse"(default,dgCMatrix) or"dense".- chunk_size
Number of source vertices per Dijkstra batch.
- cache
Logical; cache symmetric results when
targetsis NULL or identical tovertices.- cache_key
Optional manual cache key.
- algorithm
Only "dijkstra" is currently implemented.
Examples
geom <- example_surface_geometry()
dmat <- geodesic_distance_matrix(geom, vertices = 1:2)