-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cover tree could rearrange descendants in memory for faster accesses #275
Comments
Hi, |
Hi Naman, Take a look at the code for BinarySpaceTree (src/mlpack/core/tree/binary_space_tree). The BinarySpaceTree, because it rearranges descendants, must make a copy of the const data matrix, or otherwise the data matrix must be passed as an rvalue reference. You can make the same modification for the cover tree. |
Hi Ryan, |
… fails the unit tests
Reported by rcurtin on 14 Dec 43355870 02:33 UTC
Right now, the dataset which is given to the cover tree when it is built does not move any points around in memory; it simply holds references to the points in the tree.
In situations where the descendants are looped over (with NumDescendants() and Descendant()), this is far from optimal and could be much faster if the points had been arranged in memory such that Descendant(i) just returns i plus some constant (the point held by that node).
This would take some refactoring of the cover tree class but should provide decent speedup.
Migrated-From: http://trac.research.cc.gatech.edu/fastlab/ticket/285
The text was updated successfully, but these errors were encountered: