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
27 template<
typename RuleType>
28 class CoverTree<MetricType, StatisticType, MatType, RootPointPolicy>::
35 DualTreeTraverser(RuleType& rule);
79 if (score == other.
score)
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" CoverTree()
A default constructor.
size_t NumPrunes() const
Get the number of pruned nodes.
Linear algebra utility functions, generally performed on matrices or vectors.
size_t NumBaseCases() const
size_t NumVisited() const
The core includes that mlpack expects; standard C++ includes and Armadillo.
bool operator<(const DualCoverTreeMapEntry &other) const
Comparison operator, for sorting within the map.
CoverTree< MetricType, StatisticType, MatType, RootPointPolicy > * referenceNode
The node this entry refers to.
double baseCase
The base case.
size_t numPrunes
The number of pruned nodes.
RuleType & rule
The instantiated rule set for pruning branches.
RuleType::TraversalInfoType traversalInfo
The traversal info associated with the call to Score() for this entry.
Struct used for traversal.
size_t & NumPrunes()
Modify the number of pruned nodes.
A cover tree is a tree specifically designed to speed up nearest-neighbor computation in high-dimensi...
double score
The score of the node.