getAdj_manual: Calculate adjacency matrix by user-specified radius

View source: R/main.R

getAdj_manualR Documentation

Calculate adjacency matrix by user-specified radius

Description

an efficient function to find the neighbors based on the matrix of position and a pre-defined radius.

Usage

getAdj_manual(pos, radius)

Arguments

pos

is a n-by-d matrix of position, where n is the number of spots, and d is the dimension of coordinates.

radius

is a threashold of Euclidean distance to decide whether a spot is an neighborhood of another spot. For example, if the Euclidean distance between spot A and B is less than radius, then A is taken as the neighbourhood of B.

Value

A sparse matrix containing the neighbourhood

See Also

getAdj_auto, getAdj.


DR.SC documentation built on May 29, 2024, 2:12 a.m.