[mlpack-git] [mlpack/mlpack] Hilbert R tree (#664)
lozhnikov
notifications at github.com
Mon Jun 20 20:50:33 EDT 2016
> + ownsLocalDataset = true;
> + }
> +
> + if (ownsLocalDataset)
> + {
> + localDataset = new arma::Mat<HilbertElemType>(tree->Dataset().n_rows,
> + tree->MaxLeafSize() + 1);
> + }
> +
> +}
> +
> +template<typename TreeElemType>
> +DiscreteHilbertValue<TreeElemType>::
> +DiscreteHilbertValue(const DiscreteHilbertValue& other) :
> + localDataset(const_cast<arma::Mat<HilbertElemType>*>(other.LocalDataset())),
> + ownsLocalDataset(other.ownsLocalDataset),
For example
```
TreeType* copy = new TreeType(*tree, false);
copy->Parent() = tree;
tree->Count() = 0;
tree->NullifyData();
```
As for me this code looks weird, maybe something like std::move is better?
---
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#r67792463
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160620/4a185004/attachment.html>
More information about the mlpack-git
mailing list