[mlpack-git] [mlpack/mlpack] Use move semantics to set a given reference tree in NeighborSearch class. (#743)
notifications at github.com
Fri Aug 12 16:20:35 EDT 2016
Hi @rcurtin, thanks for your comments.
I have update the code to include your suggestions:
+ I have added more overloads for the constructor and Train() methods, to consider lvalue and rvalue references (copy and move semantics).
All of them are very simple because they just create a new tree and then call the overloads that take `TreeType*`.
+ I didn't remove the overlads that take `TreeType*` to maintain reverse compatibility, as you suggested. If you agree, we could add a comment that these methods will be removed in the future release (if we decide that).
In my opinion we should remove that overloads in the next release, and only maintain the 2 overloads with references. If we do so, we will sure that `NeighborSearch` class always has ownership of the reference tree (because it was copied or moved).
Would you agree?
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mlpack-git