22 #ifndef __MLPACK_CORE_TREE_COVER_TREE_DUAL_TREE_TRAVERSER_HPP 23 #define __MLPACK_CORE_TREE_COVER_TREE_DUAL_TREE_TRAVERSER_HPP 31 template<
typename MetricType,
typename RootPo
intPolicy,
typename StatisticType>
32 template<
typename RuleType>
33 class CoverTree<MetricType, RootPointPolicy, StatisticType>::DualTreeTraverser
39 DualTreeTraverser(RuleType& rule);
82 if (score == other.
score)
85 return (score < other.
score);
93 std::map<
int, std::vector<DualCoverTreeMapEntry> >&
98 std::map<
int, std::vector<DualCoverTreeMapEntry> >&
100 std::map<
int, std::vector<DualCoverTreeMapEntry> >&
103 void ReferenceRecursion(
CoverTree& queryNode,
104 std::map<
int, std::vector<DualCoverTreeMapEntry> >&
112 #include "dual_tree_traverser_impl.hpp" size_t & NumPrunes()
Modify the number of pruned nodes.
bool operator<(const DualCoverTreeMapEntry &other) const
Comparison operator, for sorting within the map.
Linear algebra utility functions, generally performed on matrices or vectors.
double score
The score of the node.
CoverTree(const arma::mat &dataset, const double base=2.0, MetricType *metric=NULL)
Create the cover tree with the given dataset and given base.
size_t numPrunes
The number of pruned nodes.
RuleType::TraversalInfoType traversalInfo
The traversal info associated with the call to Score() for this entry.
RuleType & rule
The instantiated rule set for pruning branches.
Struct used for traversal.
size_t NumBaseCases() const
size_t NumVisited() const
double baseCase
The base case.
size_t NumPrunes() const
Get the number of pruned nodes.
A cover tree is a tree specifically designed to speed up nearest-neighbor computation in high-dimensi...
CoverTree< MetricType, RootPointPolicy, StatisticType > * referenceNode
The node this entry refers to.