[mlpack-git] [mlpack/mlpack] Vantage point tree (#708)

Ryan Curtin notifications at github.com
Tue Jul 12 09:28:05 EDT 2016


I spent a long time thinking about it.  First, I thought, how can we make right children have `FirstPointIsCentroid = false` and left children have `FirstPointIsCentroid = true` but have both children be of the same type?  But I don't think that is possible.

The second option is to have left and right children have different type.  This could work because all of the classes only hold pointers to the root of the tree, which in this case would have the type of the left children.  But there would need to be some refactoring of the rules, so that the `Score()` and `Rescore()` methods could take two different types of trees, and so that the `TreeType` template parameter was at the method level, not the class level.  I think that is possible and not too difficult, though there might be a gotcha or two with the `TraversalInfoType`.  Whatever we changed, we would have to document in the TreeType API page.

The third option is to find a way so that `FirstPointIsCentroid` is a static compile-time constant for some trees, but is a runtime constant for others.  I have not thought about this much so I am not sure if it is completely feasible, but I think it is possible.

The fourth option, from earlier, is to just leave `FirstPointIsCentroid = false` for vantage point trees.

What do you think is the best approach here?

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/708#issuecomment-232046825
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160712/e5c628a0/attachment.html>


More information about the mlpack-git mailing list