mlpack  2.0.1
r_tree_split.hpp
Go to the documentation of this file.
1 
15 #ifndef __MLPACK_CORE_TREE_RECTANGLE_TREE_R_TREE_SPLIT_HPP
16 #define __MLPACK_CORE_TREE_RECTANGLE_TREE_R_TREE_SPLIT_HPP
17 
18 #include <mlpack/core.hpp>
19 
20 namespace mlpack {
21 namespace tree {
22 
29 {
30  public:
35  template<typename TreeType>
36  static void SplitLeafNode(TreeType* tree,
37  std::vector<bool>& relevels);
38 
43  template<typename TreeType>
44  static bool SplitNonLeafNode(TreeType* tree,
45  std::vector<bool>& relevels);
46 
47  private:
51  template<typename TreeType>
52  static void GetPointSeeds(const TreeType& tree, int& i, int& j);
53 
57  template<typename TreeType>
58  static void GetBoundSeeds(const TreeType& tree, int& i, int& j);
59 
63  template<typename TreeType>
64  static void AssignPointDestNode(TreeType* oldTree,
65  TreeType* treeOne,
66  TreeType* treeTwo,
67  const int intI,
68  const int intJ);
69 
73  template<typename TreeType>
74  static void AssignNodeDestNode(TreeType* oldTree,
75  TreeType* treeOne,
76  TreeType* treeTwo,
77  const int intI,
78  const int intJ);
79 
83  template<typename TreeType>
84  static void InsertNodeIntoTree(TreeType* destTree, TreeType* srcNode);
85 };
86 
87 } // namespace tree
88 } // namespace mlpack
89 
90 // Include implementation
91 #include "r_tree_split_impl.hpp"
92 
93 #endif
Linear algebra utility functions, generally performed on matrices or vectors.
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.
static void SplitLeafNode(TreeType *tree, std::vector< bool > &relevels)
Split a leaf node using the "default" algorithm.
Include all of the base components required to write MLPACK methods, and the main MLPACK Doxygen docu...
static void GetPointSeeds(const TreeType &tree, int &i, int &j)
Get the seeds for splitting a leaf node.
static void GetBoundSeeds(const TreeType &tree, int &i, int &j)
Get the seeds for splitting a non-leaf node.
static void AssignNodeDestNode(TreeType *oldTree, TreeType *treeOne, TreeType *treeTwo, const int intI, const int intJ)
Assign nodes to the two new nodes.
static void AssignPointDestNode(TreeType *oldTree, TreeType *treeOne, TreeType *treeTwo, const int intI, const int intJ)
Assign points to the two new nodes.
A Rectangle Tree has new points inserted at the bottom.