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

Ryan Curtin notifications at github.com
Tue Jun 21 10:48:41 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),

Yeah, I agree, that does look weird.  I think that maybe some refactoring could help here but I am not sure how right now.  Let's leave it for another PR.

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


More information about the mlpack-git mailing list