Compute vertex neighborhoods for a mesh.
Arguments
- surface
a mesh, represented as an
fs.surfaceinstance from thefreesurferformatspackage or atmesh3dinstance fromrgl, or a character string representing the path of a mesh to load withfreesurferformats::read.fs.surface.- k
scalar positive integer, the k value for the k-ring neighborhood. For k=1, this function computes the adjacency list representation of the graph (where the neighbors include the vertex itself).
Examples
if (FALSE) { # \dontrun{
mesh = rgl::tetrahedron3d();
mesh_adj = mesh.adj(mesh, k = 1L);
} # }