Rookfighter / knn-cpp

A header-only C++ library for k nearest neighbor search with Eigen3.
MIT License
51 stars 5 forks source link

Compilation errors #1

Closed KristianZarn closed 5 years ago

KristianZarn commented 5 years ago

I am getting multiple errors on compilation of kdtree_eigen.h.

Some of the variables seem to have not been declared. These are the errors I get:

kdtree_eigen.h:196:42: error: ‘endIdx’ was not declared in this scope
             for(Index i = startIdx; i <= endIdx; ++i)

kdtree_eigen.h:295:33: error: ‘currIndices’ was not declared in this scope
                 return new Node(currIndices);

kdtree_eigen.h:356:40: error: ‘midpoint’ was not declared in this scope
             return new Node(splitaxis, midpoint, leftNode, rightNode);

kdtree_eigen.h:365:16: error: ‘currIndices’ was not declared in this scope
             if(currIndices.size() <= bucketSize_)
Rookfighter commented 5 years ago

Hi Kristian, sorry about that. I just started doing some performance improvements on the kdtree, that's why it's not compiling. I thought nobody except me was using this library, so I did not bother creating a new branch.

I created a tag v0.1 which works perfectly fine. Apparently it is just 1 commit behind HEAD of master.

I hope this solves your issue. I'll be finishing performance improvements this week.

EDIT: My current changes will not affect the interface of the kdtree. As soon as it's ready you can just switch to the new version.

KristianZarn commented 5 years ago

Thank you, the code compiles now :)