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

Li Dong notifications at github.com
Mon Feb 29 09:35:25 EST 2016


Thanks for reply! To my knowledge, `RangeSearch` should support multiple types of trees, but in its template interface:
```
template<typename MetricType = metric::EuclideanDistance,
         typename MatType = arma::mat,
         template<typename TreeMetricType,                                          
                  typename TreeStatType,                                            
                  typename TreeMatType> class TreeType = tree::KDTree>              
class RangeSearch
```
the TreeType has been constrained to the above form, so when I used the following trees other than `KDTree`:
```
range::RangeSearch<MetricType, arma::mat, tree::CoverTree>
```
or
```
range::RangeSearch<MetricType, arma::mat, tree::BinarySpaceTree>
```
I got the following errors:
```
error: template template argument has different template parameters than its
      corresponding template template parameter
    typedef range::RangeSearch<MetricType, arma::mat, tree::CoverTree> SearchType;
```
or
```
error: template template argument has different template parameters than its
      corresponding template template parameter
    typedef range::RangeSearch<MetricType, arma::mat, tree::BinarySpaceTree> SearchType;
```

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


More information about the mlpack-git mailing list