Create knn.cpp

the base module version