getAdj_auto.Rd
an efficient function to find the radius by bi-section method , then find neighbors based on the matrix of position, which ensures that each spot has approximately lower.med~upper.med neighbors in the sense of median.
getAdj_auto(pos, lower.med=4, upper.med=6, radius.upper= NULL)
a n-by-2 matrix of position.
an integer, the lower bound of median number of neighbors among all spots.
an integer, the upper bound of median number of neighbors among all spots.
a real, the upper bound of radius, default as NULL. If radius.upper= NULL
, the upper bound is automatically determined by algorithm.
A sparse adjacency matrix containing the neighbourhood.