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

Ryan Curtin notifications at github.com
Mon Jun 20 17:41:12 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;
> +  }

Should we change this now?  If we have decided that the `localDataset` should be removed from `RectangleTree`, then I think that we can change `localDataset` and `ownsLocalDataset` here to `dataset` and `ownsDataset`, and make `ownsDataset` only true when the node is the root, not also when it is a leaf.  Maybe `hilbertValues` is a better name than `dataset`, since that object is holding the Hilbert values for each dimension, not the actual dataset itself.

---
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#r67772032
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160620/4a13d8e9/attachment-0001.html>


More information about the mlpack-git mailing list