12#ifndef MLPACK_CORE_TREE_COVER_TREE_DUAL_TREE_TRAVERSER_HPP
13#define MLPACK_CORE_TREE_COVER_TREE_DUAL_TREE_TRAVERSER_HPP
23 typename StatisticType,
25 typename RootPointPolicy
27template<
typename RuleType>
28class CoverTree<MetricType, StatisticType, MatType, RootPointPolicy>::
64 struct DualCoverTreeMapEntry
74 typename RuleType::TraversalInfoType traversalInfo;
77 bool operator<(
const DualCoverTreeMapEntry& other)
const
79 if (score == other.score)
80 return (baseCase < other.baseCase);
82 return (score < other.score);
90 std::map<
int, std::vector<DualCoverTreeMapEntry> >&
95 std::map<
int, std::vector<DualCoverTreeMapEntry> >&
97 std::map<
int, std::vector<DualCoverTreeMapEntry> >&
100 void ReferenceRecursion(
CoverTree& queryNode,
101 std::map<
int, std::vector<DualCoverTreeMapEntry> >&
109#include "dual_tree_traverser_impl.hpp"
A dual-tree cover tree traverser; see dual_tree_traverser.hpp.
void Traverse(CoverTree &queryNode, CoverTree &referenceNode)
Traverse the two specified trees.
size_t NumVisited() const
DualTreeTraverser(RuleType &rule)
Initialize the dual tree traverser with the given rule type.
size_t NumPrunes() const
Get the number of pruned nodes.
size_t & NumPrunes()
Modify the number of pruned nodes.
size_t NumBaseCases() const
A cover tree is a tree specifically designed to speed up nearest-neighbor computation in high-dimensi...
CoverTree()
A default constructor.
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.