To Initializesfcnn_knng is a specialized version of the sfcnn algorithm designed to quickly generate K-nearest neighbor graphs. If compiled using openmp, it will use multiple processors to compute the solution. To include it in a program, use sfcnn_knng.hpp sfcnn_knng< MyPointType, Dimension, CoordType > NN(&FirstDataPoint, Size, k, ThreadCount);
| To Make a QueryNote: All calculation for the k nearest neighbor graph is done at initialization. NN[i][j] This returns the index of the jth nearest neighbor to the ith data point. The indexes are all relative to the first data point given at initialization. If the data points have moved, the answer will be incorrect. |