<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'>> + }
> +}
> +
> +template<typename MetricType,
> + typename StatisticType,
> + typename MatType,
> + template<typename BoundMetricType, typename...> class BoundType,
> + template<typename SplitBoundType, typename SplitMatType>
> + class SplitType>
> +template<typename RuleType>
> +void VantagePointTree<MetricType, StatisticType, MatType, BoundType, SplitType>::
> +DualTreeTraverser<RuleType>::Traverse(
> + const size_t queryIndex,
> + VantagePointTree<MetricType, StatisticType, MatType, BoundType, SplitType>&
> + referenceNode)
> +{
</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<typename RuleType>
class Traverser
{
void Traverse(const size_t queryIndex, TreeType& referenceNode);
void Traverse(TreeType& queryNode, TreeType& 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;">—<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>