mlpack  2.0.1
single_tree_traverser.hpp
Go to the documentation of this file.
1 
16 #ifndef __MLPACK_CORE_TREE_BINARY_SPACE_TREE_SINGLE_TREE_TRAVERSER_HPP
17 #define __MLPACK_CORE_TREE_BINARY_SPACE_TREE_SINGLE_TREE_TRAVERSER_HPP
18 
19 #include <mlpack/core.hpp>
20 
21 #include "binary_space_tree.hpp"
22 
23 namespace mlpack {
24 namespace tree {
25 
26 template<typename MetricType,
27  typename StatisticType,
28  typename MatType,
29  template<typename BoundMetricType> class BoundType,
30  template<typename SplitBoundType, typename SplitMatType>
31  class SplitType>
32 template<typename RuleType>
33 class BinarySpaceTree<MetricType, StatisticType, MatType, BoundType,
34  SplitType>::SingleTreeTraverser
35 {
36  public:
40  SingleTreeTraverser(RuleType& rule);
41 
49  void Traverse(const size_t queryIndex, BinarySpaceTree& 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
RuleType & rule
Reference to the rules with which the tree will be traversed.
Linear algebra utility functions, generally performed on matrices or vectors.
size_t NumPrunes() const
Get the number of prunes.
size_t numPrunes
The number of nodes which have been pruned during traversal.
BinarySpaceTree()
A default constructor.
Include all of the base components required to write MLPACK methods, and the main MLPACK Doxygen docu...
size_t & NumPrunes()
Modify the number of prunes.