[mlpack-git] [mlpack/mlpack] Hilbert R tree (#664)
Ryan Curtin
notifications at github.com
Tue Jun 21 13:59:25 EDT 2016
> + {
> + // Get the position at which the point should be inserted
> + // Update the largest Hilbert value of the node
> + size_t pos = hilbertValue.InsertPoint(node, node->Dataset().col(point));
> +
> + // Move points
> + for (size_t i = node->NumPoints(); i > pos; i--)
> + node->Points()[i] = node->Points()[i-1];
> + // Insert the point
> + node->Points()[pos] = point;
> + node->Count()++;
> + }
> + else
> + {
> + // Calculate the Hilbert value
> + hilbertValue.InsertPoint(node, node->Dataset().col(point));
Oh, you're right, I see now. I agree, depending only on `TreeElemType` is better, so we shouldn't refactor it.
---
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/files/f9127cea62d5ce1ad8d5f59931de108a2f7cdd9b#r67919507
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160621/992bd779/attachment.html>
More information about the mlpack-git
mailing list