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

lozhnikov notifications at github.com
Mon Jun 20 20:44:36 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;
> +  }

I agree that `hilbertValues` is a better name. But I think that `localDataset` works fine and since we decided that we should add something like `InsertPoints()` into `RectangleTree` we have to update `hilbertValues` on each insertion/deletion. Right now `localDataset` does not require 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#r67792069
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160620/90556b97/attachment-0001.html>


More information about the mlpack-git mailing list