[mlpack-git] [mlpack] RangeSearch constructor: address of '<tree object>' will always evaluate to 'true' (#528)

Ryan Curtin notifications at github.com
Mon Feb 29 10:04:58 EST 2016


It does, but the names of those tree types have changed a little bit; for the standard cover tree use `tree::StandardCoverTree` [1], for the ball tree, use `tree::BallTree` [2], for the R tree, use `tree::RTree` [3], and for the R*-tree, use `tree::RStarTree` [4].  The basic idea was that a user shouldn't need to explicitly specify the metric for the tree or the statistic type either; instead, they could just specify the type of the tree (as a template template parameter) and then we could use the other template parameters of the class to fill in the rest.

In order to do this, we had to develop a `TreeType` policy class that takes three template parameters (metric, matrix type, and statistic) [5], then we had to refactor all of the dual-tree algorithms to use this policy class (this was done for the 2.0.0 release).  In general, template typedefs are used to turn more-general classes like `BinarySpaceTree` (which has four template parameters) into the three that are necessary for the `TreeType` policy class.  Each of the four tree types I mentioned earlier is a template typedef.

[1] http://mlpack.org/docs/mlpack-2.0.1/doxygen.php?doc=namespacemlpack_1_1tree.html#a97bb6c0e6c1be359a95c89d21b1afd42
[2] http://mlpack.org/docs/mlpack-2.0.1/doxygen.php?doc=namespacemlpack_1_1tree.html#a918273941d2d1d3999bf232280530d50
[3] http://mlpack.org/docs/mlpack-2.0.1/doxygen.php?doc=namespacemlpack_1_1tree.html#ae9e12acec37727ae9a4dbca379ba4317
[4] http://mlpack.org/docs/mlpack-2.0.1/doxygen.php?doc=namespacemlpack_1_1tree.html#adbf07e6ff61d2d7840b2c7ea88d25fb7
[5] http://mlpack.org/docs/mlpack-2.0.1/doxygen.php?doc=trees.html

---
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/issues/528#issuecomment-190249646
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160229/3f22f09f/attachment.html>


More information about the mlpack-git mailing list