<p>In <a href="https://github.com/mlpack/mlpack/pull/708#discussion_r71911629">src/mlpack/core/tree/vantage_point_tree/dual_tree_traverser_impl.hpp</a>:</p>
<pre style='color:#555'>&gt; +  }
&gt; +}
&gt; +
&gt; +template&lt;typename MetricType,
&gt; +         typename StatisticType,
&gt; +         typename MatType,
&gt; +         template&lt;typename BoundMetricType, typename...&gt; class BoundType,
&gt; +         template&lt;typename SplitBoundType, typename SplitMatType&gt;
&gt; +             class SplitType&gt;
&gt; +template&lt;typename RuleType&gt;
&gt; +void VantagePointTree&lt;MetricType, StatisticType, MatType, BoundType, SplitType&gt;::
&gt; +DualTreeTraverser&lt;RuleType&gt;::Traverse(
&gt; +    const size_t queryIndex,
&gt; +    VantagePointTree&lt;MetricType, StatisticType, MatType, BoundType, SplitType&gt;&amp;
&gt; +        referenceNode)
&gt; +{
</pre>
<p>I believe you are right that <code>traversalInfo</code> is not modified by a single-tree traversal.</p>

<p>I don't think it's necessary to add a <code>SingleTreeTraverser</code> object to <code>DualTreeTraverser</code>, but instead simply implement both in a single class:</p>

<pre><code>template&lt;typename RuleType&gt;
class Traverser
{
  void Traverse(const size_t queryIndex, TreeType&amp; referenceNode);
  void Traverse(TreeType&amp; queryNode, TreeType&amp; referenceNode); 
}
</code></pre>

<p>Then inside the <code>VantagePointTree</code> class you could define this class as both the single-tree and dual-tree traverser type.  I don't think there would be an issue with <code>numBaseCases</code> or <code>numPrunes</code> or <code>numScores</code> that way (or whichever of those statistics are tracked).  Maybe I have overlooked something here?</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/pull/708/files/300882ac96e7a663e3e303ca0c45c14c6fafe1a6#r71911629">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJ4bFA6Qq3Gzn3swDMKQEkKA3EaGT-a1ks5qYPhwgaJpZM4I_COp">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFJBaBBwEMRTxbc76LdfFtk9Yyp5fks5qYPhwgaJpZM4I_COp.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/pull/708/files/300882ac96e7a663e3e303ca0c45c14c6fafe1a6#r71911629"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>