mlpack  master
spill_single_tree_traverser.hpp
Go to the documentation of this file.
1 
17 #ifndef MLPACK_CORE_TREE_SPILL_TREE_SPILL_SINGLE_TREE_TRAVERSER_HPP
18 #define MLPACK_CORE_TREE_SPILL_TREE_SPILL_SINGLE_TREE_TRAVERSER_HPP
19 
20 #include <mlpack/prereqs.hpp>
21 
22 #include "spill_tree.hpp"
23 
24 namespace mlpack {
25 namespace tree {
26 
27 template<typename MetricType,
28  typename StatisticType,
29  typename MatType,
30  template<typename HyperplaneMetricType> class HyperplaneType,
31  template<typename SplitMetricType, typename SplitMatType>
32  class SplitType>
33 template<typename RuleType, bool Defeatist>
34 class SpillTree<MetricType, StatisticType, MatType, HyperplaneType, SplitType>::
36 {
37  public:
41  SpillSingleTreeTraverser(RuleType& rule);
42 
50  void Traverse(const size_t queryIndex, SpillTree& referenceNode);
51 
53  size_t NumPrunes() const { return numPrunes; }
55  size_t& NumPrunes() { return numPrunes; }
56 
57  private:
59  RuleType& rule;
60 
62  size_t numPrunes;
63 };
64 
65 } // namespace tree
66 } // namespace mlpack
67 
68 // Include implementation.
69 #include "spill_single_tree_traverser_impl.hpp"
70 
71 #endif
RuleType & rule
Reference to the rules with which the tree will be traversed.
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: binarize.hpp:18
The core includes that mlpack expects; standard C++ includes and Armadillo.
A generic single-tree traverser for hybrid spill trees; see spill_single_tree_traverser.hpp for implementation.
size_t numPrunes
The number of nodes which have been pruned during traversal.
A hybrid spill tree is a variant of binary space trees in which the children of a node can "spill ove...
Definition: spill_tree.hpp:73
size_t NumPrunes() const
Get the number of prunes.