<p>Thanks for reply! To my knowledge, <code>RangeSearch</code> should support multiple types of trees, but in its template interface:</p>

<pre><code>template&lt;typename MetricType = metric::EuclideanDistance,
         typename MatType = arma::mat,
         template&lt;typename TreeMetricType,                                          
                  typename TreeStatType,                                            
                  typename TreeMatType&gt; class TreeType = tree::KDTree&gt;              
class RangeSearch
</code></pre>

<p>the TreeType has been constrained to the above form, so when I used the following trees other than <code>KDTree</code>:</p>

<pre><code>range::RangeSearch&lt;MetricType, arma::mat, tree::CoverTree&gt;
</code></pre>

<p>or</p>

<pre><code>range::RangeSearch&lt;MetricType, arma::mat, tree::BinarySpaceTree&gt;
</code></pre>

<p>I got the following errors:</p>

<pre><code>error: template template argument has different template parameters than its
      corresponding template template parameter
    typedef range::RangeSearch&lt;MetricType, arma::mat, tree::CoverTree&gt; SearchType;
</code></pre>

<p>or</p>

<pre><code>error: template template argument has different template parameters than its
      corresponding template template parameter
    typedef range::RangeSearch&lt;MetricType, arma::mat, tree::BinarySpaceTree&gt; SearchType;
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/mlpack/mlpack/issues/528#issuecomment-190233879">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFOQUrbdQRs54UTwIRDNvMdAelg9Iks5pov0tgaJpZM4Hkfnv.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/mlpack/mlpack/issues/528#issuecomment-190233879"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>