Helper function to compute the index_corr vector
compute_index_corr_from_map(map, eps = 0.1)
used as location to compute distance, can be 1d (numerical) or 2d (data.frame)
threshold to determine if two points are close (if close, we consider them as the same point)
the index_corr vector for ngme correlated measurement noise
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