hilbert_r_tree_split.hpp
Go to the documentation of this file.
1 
13 #ifndef MLPACK_CORE_TREE_RECTANGLE_TREE_HILBERT_R_TREE_SPLIT_HPP
14 #define MLPACK_CORE_TREE_RECTANGLE_TREE_HILBERT_R_TREE_SPLIT_HPP
15 
16 #include <mlpack/prereqs.hpp>
17 
18 namespace mlpack {
19 namespace tree {
20 
28 template<size_t splitOrder = 2>
30 {
31  public:
39  template<typename TreeType>
40  static void SplitLeafNode(TreeType* tree, std::vector<bool>& relevels);
41 
49  template<typename TreeType>
50  static bool SplitNonLeafNode(TreeType* tree, std::vector<bool>& relevels);
51 
52  private:
62  template<typename TreeType>
63  static bool FindCooperatingSiblings(TreeType* parent,
64  const size_t iTree,
65  size_t& firstSibling,
66  size_t& lastSibling);
67 
75  template<typename TreeType>
76  static void RedistributeNodesEvenly(const TreeType* parent,
77  const size_t firstSibling,
78  const size_t lastSibling);
79 
87  template<typename TreeType>
88  static void RedistributePointsEvenly(TreeType* parent,
89  const size_t firstSibling,
90  const size_t lastSibling);
91 };
92 
93 } // namespace tree
94 } // namespace mlpack
95 
96 // Include implementation.
97 #include "hilbert_r_tree_split_impl.hpp"
98 
99 #endif
100 
.hpp
Definition: add_to_po.hpp:21
The core includes that mlpack expects; standard C++ includes and Armadillo.
The splitting procedure for the Hilbert R tree.
static void SplitLeafNode(TreeType *tree, std::vector< bool > &relevels)
Split a leaf node using the "default" algorithm.
static bool SplitNonLeafNode(TreeType *tree, std::vector< bool > &relevels)
Split a non-leaf node using the "default" algorithm.