my problem is as follows:
I have a list of N pairs of coordinates labelled (x[i],y[i]) i=1,...,N.
What I want to do is to take every point (x[i],y[i]) and find the Pythagorean distance to it's nearest neighbour.
So I have to loop over all the points, and then take that minimum distance for each point.. the distance will be given by
I am new to C and have no idea how to do this!
Any help would be appreciated
thanks a lot