add knn function and debug the function LAT2011

add knn function and debug the function LAT2011