[mlpack-git] [mlpack/mlpack] Replace `MinDistance(TreeType*)` with `MinDistance(TreeType&)` (#787)

Ryan Curtin notifications at github.com
Thu Sep 15 16:22:23 EDT 2016

Right now, the TreeType API requires the following functions to have this signature:

ElemType MinDistance(const TreeType* other);
ElemType MaxDistance(const TreeType* other);
math::RangeType<ElemType> RangeDistance(const TreeType* other);

But we can easily use references here.  We should refactor the trees (`mlpack/core/tree/*/`) to instead use the signature

ElemType MinDistance(const TreeType& other);
ElemType MaxDistance(const TreeType& other);
math::RangeType<ElemType> RangeDistance(const TreeType& other);

That will also force some changes in the dual-tree algorithm code, but it should be relatively simple refactoring in the end.  This would be a good starter bug for someone looking to get involved---but I want it to be done before the 2.1.0 release, which is soon, so I may end up doing this myself in the next two weeks if nobody beats me to a PR. :)

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...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160915/96b1c8f3/attachment.html>

More information about the mlpack-git mailing list