<p>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.</p>

<p>One thing you can do is, instead of using <code>tree::BinarySpaceTree&lt;MetricType&gt;</code>, you can use the convenience typedef provided by the RangeSearch class:</p>

<pre><code>RangeSearch&lt;&gt;::Tree datasetTree(dataset);
</code></pre>

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

<p>I think that the tutorial documentation for RangeSearch is incorrect, so I'll try and get this fixed later today (which will also solve <a href="https://github.com/mlpack/mlpack/issues/525" class="issue-link js-issue-link" data-url="https://github.com/mlpack/mlpack/issues/525" data-id="136293625" data-error-text="Failed to load issue title" data-permission-text="Issue title is private">#525</a>).</p>

<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-189684777">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFEEk9jIKGc3A0-B9qytaIH2-ukLiks5poc9wgaJpZM4Hkfnv.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-189684777"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>