Helper function to compute the index_corr vector

compute_index_corr_from_map(map, eps = 0.1)

Arguments

map

used as location to compute distance, can be 1d (numerical) or 2d (data.frame)

eps

threshold to determine if two points are close (if close, we consider them as the same point)

Value

the index_corr vector for ngme correlated measurement noise

Examples

x_coord <- c(1.11, 1.12, 2, 1.3, 1.3)
y_coord <- c(2.11, 2.11, 2, 3.3, 3.3)
coord = data.frame(x_coord, y_coord)
compute_index_corr_from_map(map = coord, 0.1)
#> [1] 1 1 2 3 3