libnabo 是一个快速为低维度空间提供K最近邻居算法库。它提供了一个干净的,传统的无标量类型无关的C ++模板API。
示例代码:
#include "nabo/nabo.h"
using namespace Nabo;
using namespace Eigen;
...
NNSearchF* nns = NNSearchF::createKDTreeLinearHeap(M);
const int K = 5;
VectorXi indices(K);
VectorXf dists2(K);
nns->knn(q, indices, dists2, K);
Libnabo 1.0.4 发布了,改进内容包括:
- Adds Python bindings.
- Fixes epsilon semantics to match the one of ANN.
- Adds checks on query parameters.
- Fixes compilation on Win32 and OS X.
- Improved query performance with STL_HEAP when the number of points found is significantly smaller than the number of points requested
Libnabo 的下载地址:请点这里
