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

Ryan Curtin notifications at github.com
Tue Jun 21 15:09:48 EDT 2016


> +    ownsLocalDataset(false),
> +    numValues(0),
> +    valueToInsert(tree->Parent() ? 
> +                tree->Parent()->AuxiliaryInfo().HilbertValue().ValueToInsert() :
> +                new arma::Col<HilbertElemType>(tree->Dataset().n_rows)),
> +    ownsValueToInsert(tree->Parent() ? false : true)
> +{
> +  // Calculate the Hilbert value for all points
> +  if (!tree->Parent()) //  This is the root node
> +    ownsLocalDataset = true;
> +  else if (tree->Parent()->Children()[0]->IsLeaf())
> +  {
> +    // This is a leaf node
> +    assert(tree->Parent()->NumChildren() > 0);
> +    ownsLocalDataset = true;
> +  }

Okay, I understand.  I see that each node holds a `DiscreteHilbertValue` object, and each `DiscreteHilbertValue` object stores its own local vector of Hilbert values for each point contained in the node.  So it makes sense to keep the `localDataset` object so we can avoid resizing the Hilbert values vector, but I think we should rename it to `localHilbertValues` or something like that.

---
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#r67932653
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160621/d09c4e91/attachment.html>


More information about the mlpack-git mailing list