Fhat function

F nearest neighbour distribution function