mlpack
Static Public Member Functions | List of all members
mlpack::tree::RTreeSplit Class Reference

A Rectangle Tree has new points inserted at the bottom. More...

#include <r_tree_split.hpp>

Static Public Member Functions

template<typename TreeType >
static void SplitLeafNode (TreeType *tree, std::vector< bool > &relevels)
 Split a leaf node using the "default" algorithm. More...
 
template<typename TreeType >
static bool SplitNonLeafNode (TreeType *tree, std::vector< bool > &relevels)
 Split a non-leaf node using the "default" algorithm. More...
 

Detailed Description

A Rectangle Tree has new points inserted at the bottom.

When these nodes overflow, we split them, moving up the tree and splitting nodes as necessary.

Member Function Documentation

◆ SplitLeafNode()

template<typename TreeType >
void mlpack::tree::RTreeSplit::SplitLeafNode ( TreeType *  tree,
std::vector< bool > &  relevels 
)
static

Split a leaf node using the "default" algorithm.

We call GetPointSeeds to get the two points which will be the initial points in the new nodes We then call AssignPointDestNode to assign the remaining points to the two new nodes.

If necessary, this split will propagate upwards through the tree.

Finally, we delete the old node and insert the new nodes into the tree, spliting the parent if necessary.

◆ SplitNonLeafNode()

template<typename TreeType >
bool mlpack::tree::RTreeSplit::SplitNonLeafNode ( TreeType *  tree,
std::vector< bool > &  relevels 
)
static

Split a non-leaf node using the "default" algorithm.

We call GetBoundSeeds to get the two new nodes that this one will be broken into.

If this is a root node, the tree increases in depth.

Then we call AssignNodeDestNode to move the children of this node into either of those two nodes. Finally, we delete the now unused information and recurse up the tree if necessary. We don't need to worry about the bounds higher up the tree because they were already updated if necessary.


The documentation for this class was generated from the following files: