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

Ryan Curtin notifications at github.com
Sat Feb 27 12:08:00 EST 2016


This warning is because the type of tree passed to the RangeSearch object is not right; the RangeSearch object uses trees with the RangeSearchStat statistic.

One thing you can do is, instead of using `tree::BinarySpaceTree<MetricType>`, you can use the convenience typedef provided by the RangeSearch class:

```
RangeSearch<>::Tree datasetTree(dataset);
```

and then that should cast correctly to the right type when you call the RangeSearch constructor.

I think that the tutorial documentation for RangeSearch is incorrect, so I'll try and get this fixed later today (which will also solve #525).

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


More information about the mlpack-git mailing list