[mlpack-git] [mlpack/mlpack] Hilbert R tree (#664)

lozhnikov notifications at github.com
Thu Jun 9 13:07:14 EDT 2016


Unfortunately, the refactoring was not straightforward. I spent a lot of time thinking about that.
The main problem is bound up with the way of storing neighbors. Their indices are stored in an armadillo object. So I should know the unique index of each point in the tree. In order to do that I introduce a new variable `numNonDatasetPoints`. The `numNonDatasetPoints` variable is equal to the number of non-dataset points contained in the node. Since the tree is traversed from the root I can easily map each point to `[0,NumDescendants()-1]` in such a way that each point from the dataset has the same number as in the dataset.

I think I did an error: I tried to write a code that should be compatible with other tree traversers. But now I see that it is better to modify all rules in this way:
`BaseCase(size_t globalQueryIndex, size_t globalReferenceIndex, const VecType1& queryPoint, const VecType2& referencePoint)`
```
double Rescore(const size_t queryIndex, const VecType& queryPoint,
                 TreeType& referenceNode,
                 const double oldScore)
```
and so on.
I think I should rewrite the code in that way.
The code still has bugs and defects.

---
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/664#issuecomment-224961430
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160609/94a8ff3d/attachment.html>


More information about the mlpack-git mailing list