mlpack  2.0.1
single_tree_traverser.hpp
Go to the documentation of this file.
1 
16 #ifndef __MLPACK_CORE_TREE_COVER_TREE_SINGLE_TREE_TRAVERSER_HPP
17 #define __MLPACK_CORE_TREE_COVER_TREE_SINGLE_TREE_TRAVERSER_HPP
18 
19 #include <mlpack/core.hpp>
20 
21 #include "cover_tree.hpp"
22 
23 namespace mlpack {
24 namespace tree {
25 
26 template<
27  typename MetricType,
28  typename StatisticType,
29  typename MatType,
30  typename RootPointPolicy
31 >
32 template<typename RuleType>
33 class CoverTree<MetricType, StatisticType, MatType, RootPointPolicy>::
34  SingleTreeTraverser
35 {
36  public:
40  SingleTreeTraverser(RuleType& rule);
41 
49  void Traverse(const size_t queryIndex, CoverTree& referenceNode);
50 
52  size_t NumPrunes() const { return numPrunes; }
54  size_t& NumPrunes() { return numPrunes; }
55 
56  private:
58  RuleType& rule;
59 
61  size_t numPrunes;
62 };
63 
64 } // namespace tree
65 } // namespace mlpack
66 
67 // Include implementation.
68 #include "single_tree_traverser_impl.hpp"
69 
70 #endif
CoverTree()
A default constructor.
size_t NumPrunes() const
Get the number of prunes so far.
Linear algebra utility functions, generally performed on matrices or vectors.
size_t & NumPrunes()
Set the number of prunes (good for a reset to 0).
Include all of the base components required to write MLPACK methods, and the main MLPACK Doxygen docu...
RuleType & rule
Reference to the rules with which the tree will be traversed.
size_t numPrunes
The number of nodes which have been pruned during traversal.