mlpack  master
r_star_tree_split.hpp
Go to the documentation of this file.
1 
13 #ifndef MLPACK_CORE_TREE_RECTANGLE_TREE_R_STAR_TREE_SPLIT_HPP
14 #define MLPACK_CORE_TREE_RECTANGLE_TREE_R_STAR_TREE_SPLIT_HPP
15 
16 #include <mlpack/prereqs.hpp>
17 
18 namespace mlpack {
19 namespace tree {
20 
27 {
28  public:
34  template <typename TreeType>
35  static void SplitLeafNode(TreeType *tree,std::vector<bool>& relevels);
36 
41  template <typename TreeType>
42  static bool SplitNonLeafNode(TreeType *tree,std::vector<bool>& relevels);
43 
44  private:
48  template <typename TreeType>
49  static void InsertNodeIntoTree(TreeType* destTree, TreeType* srcNode);
50 
55  template<typename ElemType>
56  static bool PairComp(const std::pair<ElemType, size_t>& p1,
57  const std::pair<ElemType, size_t>& p2)
58  {
59  return p1.first < p2.first;
60  }
61 };
62 
63 } // namespace tree
64 } // namespace mlpack
65 
66 // Include implementation
67 #include "r_star_tree_split_impl.hpp"
68 
69 #endif
Linear algebra utility functions, generally performed on matrices or vectors.
Definition: binarize.hpp:18
static void InsertNodeIntoTree(TreeType *destTree, TreeType *srcNode)
Insert a node into another node.
static bool SplitNonLeafNode(TreeType *tree, std::vector< bool > &relevels)
Split a non-leaf node using the "default" algorithm.
The core includes that mlpack expects; standard C++ includes and Armadillo.
A Rectangle Tree has new points inserted at the bottom.
static bool PairComp(const std::pair< ElemType, size_t > &p1, const std::pair< ElemType, size_t > &p2)
Comparator for sorting with std::pair.
static void SplitLeafNode(TreeType *tree, std::vector< bool > &relevels)
Split a leaf node using the algorithm described in "The R*-tree: An Efficient and Robust Access metho...