greedy_single_tree_traverser.hpp
Go to the documentation of this file.
1 
14 #ifndef MLPACK_CORE_TREE_GREEDY_SINGLE_TREE_TRAVERSER_HPP
15 #define MLPACK_CORE_TREE_GREEDY_SINGLE_TREE_TRAVERSER_HPP
16 
17 #include <mlpack/prereqs.hpp>
18 
19 namespace mlpack {
20 namespace tree {
21 
22 template<typename TreeType, typename RuleType>
24 {
25  public:
29  GreedySingleTreeTraverser(RuleType& rule);
30 
38  void Traverse(const size_t queryIndex, TreeType& referenceNode);
39 
41  size_t NumPrunes() const { return numPrunes; }
42 
43  private:
45  RuleType& rule;
46 
48  size_t numPrunes;
49 };
50 
51 } // namespace tree
52 } // namespace mlpack
53 
54 // Include implementation.
55 #include "greedy_single_tree_traverser_impl.hpp"
56 
57 #endif
Linear algebra utility functions, generally performed on matrices or vectors.
The core includes that mlpack expects; standard C++ includes and Armadillo.
GreedySingleTreeTraverser(RuleType &rule)
Instantiate the greedy single tree traverser with the given rule set.
size_t NumPrunes() const
Get the number of prunes.
void Traverse(const size_t queryIndex, TreeType &referenceNode)
Traverse the tree with the given point.