[mlpack-git] [mlpack/mlpack] Vantage point tree (#708)
Ryan Curtin
notifications at github.com
Fri Jul 22 13:05:52 EDT 2016
> + }
> +}
> +
> +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)
> +{
I believe you are right that `traversalInfo` is not modified by a single-tree traversal.
I don't think it's necessary to add a `SingleTreeTraverser` object to `DualTreeTraverser`, but instead simply implement both in a single class:
```
template<typename RuleType>
class Traverser
{
void Traverse(const size_t queryIndex, TreeType& referenceNode);
void Traverse(TreeType& queryNode, TreeType& referenceNode);
}
```
Then inside the `VantagePointTree` 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 `numBaseCases` or `numPrunes` or `numScores` that way (or whichever of those statistics are tracked). Maybe I have overlooked something here?
---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/pull/708/files/300882ac96e7a663e3e303ca0c45c14c6fafe1a6#r71911629
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20160722/173023e2/attachment.html>
More information about the mlpack-git
mailing list