single_tree_traverser.hpp
Go to the documentation of this file.
1 
12 #ifndef MLPACK_CORE_TREE_OCTREE_SINGLE_TREE_TRAVERSER_HPP
13 #define MLPACK_CORE_TREE_OCTREE_SINGLE_TREE_TRAVERSER_HPP
14 
15 #include <mlpack/prereqs.hpp>
16 #include "octree.hpp"
17 
18 namespace mlpack {
19 namespace tree {
20 
21 template<typename MetricType, typename StatisticType, typename MatType>
22 template<typename RuleType>
23 class Octree<MetricType, StatisticType, MatType>::SingleTreeTraverser
24 {
25  public:
29  SingleTreeTraverser(RuleType& rule);
30 
38  void Traverse(const size_t queryIndex, Octree& referenceNode);
39 
41  size_t NumPrunes() const { return numPrunes; }
43  size_t& NumPrunes() { return numPrunes; }
44 
45  private:
47  RuleType& rule;
49  size_t numPrunes;
50 };
51 
52 } // namespace tree
53 } // namespace mlpack
54 
55 // Include implementation.
56 #include "single_tree_traverser_impl.hpp"
57 
58 #endif
Octree()
A default constructor.
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
size_t NumPrunes() const
Get the number of pruned nodes.
size_t & NumPrunes()
Modify the number of pruned nodes.