<p>In NeighborSearch, when the method Search(Tree* queryTree, ...) uses the given tree, it is assuming that stats there were intialized to their initial values.<br>
Shouldn't we add a comment about this to the documentation?<br>
I mean, if we do: <br>
<code><br>
KNN knn; <br>
KNN::Tree queryTree(querySet);<br>
knn.Train(someReferenceSet); <br>
knn.Search(queryTree,.....); <br>
knn.Train(someDifferentReferenceSet);<br>
</code><br>
The last search will probably give incorrect results, because the queryTree holds old unrelated statistic values for the bounds. I mean, it uses bound values from the first referenceSet to search in the second referenceSet.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/mlpack/mlpack/issues/672">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFEC6NWaH14cGe9AxnGLZ-HubHVQXks5qIC9egaJpZM4Itiy7">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFMmoujPQ2l-bIVEpK7XYNvet5iqZks5qIC9egaJpZM4Itiy7.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/672"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>