<p>I think the issue here is not lack of documentation but instead that the <code>treeNeedsReset</code> member is used to check if a search has already been done, but it resets the statistics in the reference tree, not the query tree. If we change this code to work with the query tree instead of the reference tree, I think there is no issue.</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#issuecomment-223583216">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe/AJ4bFD_-3IfadXNsfd-OrUH9FT34pthZks5qIDCSgaJpZM4Itiy7">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFIZnzc5u_dhHnGaaiRldhUNmzg0bks5qIDCSgaJpZM4Itiy7.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#issuecomment-223583216"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>