The program knn.sci gives you a n implementation of the knn algorithm. this can
be used in a variety of applications.We assume that the object,(or a handle to
it) whose neighbors are to be determined is wrapped inside a structure which
contains all the extracted features of it as a feature vector called features.
similarly we assume that the other objects which are to be compared are packed
similarly and put in an array.
the routine knn(queryObject,spaceArray,n) returns n or (more if more than n is
at the same distance) which are the nearest neighbors of the query object
currently the square of the Euclidean distance is used as the distance
measure,but this can be changed to any distance measure by defining your own
knn_d function in your program.