Correlation function for the Grid-Poisson Euclidean matching on a line and on a circle