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

lozhnikov notifications at github.com
Tue Jun 21 13:05:30 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));

Hm.. Right now the DiscreteHilbertValue does not depend on `TreeType` or `MatType`. It depends only on `TreeElemType`. I think this is the weakest requirement. So, I think we should not refactor that. What do you think about 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#r67909500
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160621/be91ce22/attachment.html>


More information about the mlpack-git mailing list