getAdj_fixedNumber {PRECAST} | R Documentation |
Calculate adjacency matrix by user-specified number of neighbors
Description
an efficient function to find the neighborhood based on the matrix of position and a user-specified number of neighbors of each spot.
Usage
getAdj_fixedNumber(pos, number=6)
Arguments
pos |
is a n-by-d matrix of position, where n is the number of spots, and d is the dimension of coordinates. |
number |
is the number of neighbors of each spot. Euclidean distance to decide whether a spot is an neighborhood of another spot. |
Value
A sparse matrix containing the neighbourhood.
See Also
[Package PRECAST version 1.6.5 Index]