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

The RPlusPlusTreeSplitPolicy helps to determine the subtree into which we should insert a child of an intermediate node that is being split. More...

#include <r_plus_plus_tree_split_policy.hpp>

Static Public Member Functions

template<typename TreeType >
static int GetSplitPolicy (const TreeType &child, const size_t axis, const typename TreeType::ElemType cut)
 This method returns SplitRequired if a child of an intermediate node should be split, AssignToFirstTree if the child should be inserted to the first subtree, AssignToSecondTree if the child should be inserted to the second subtree. More...
 
template<typename TreeType >
static const bound::HRectBound< metric::EuclideanDistance, typename TreeType::ElemType > & Bound (const TreeType &node)
 Return the maximum bounding rectangle of the node. More...
 

Static Public Attributes

static const int SplitRequired = 0
 Indicate that the child should be split.
 
static const int AssignToFirstTree = 1
 Indicate that the child should be inserted to the first subtree.
 
static const int AssignToSecondTree = 2
 Indicate that the child should be inserted to the second subtree.
 

Detailed Description

The RPlusPlusTreeSplitPolicy helps to determine the subtree into which we should insert a child of an intermediate node that is being split.

This class is designed for the R++ tree.

Member Function Documentation

◆ Bound()

template<typename TreeType >
static const bound::HRectBound<metric::EuclideanDistance, typename TreeType::ElemType>& mlpack::tree::RPlusPlusTreeSplitPolicy::Bound ( const TreeType &  node)
inlinestatic

Return the maximum bounding rectangle of the node.

This method should always return the bound that is used for the decision-making in GetSplitPolicy().

Parameters
nodeThe node whose bound is requested.

◆ GetSplitPolicy()

template<typename TreeType >
static int mlpack::tree::RPlusPlusTreeSplitPolicy::GetSplitPolicy ( const TreeType &  child,
const size_t  axis,
const typename TreeType::ElemType  cut 
)
inlinestatic

This method returns SplitRequired if a child of an intermediate node should be split, AssignToFirstTree if the child should be inserted to the first subtree, AssignToSecondTree if the child should be inserted to the second subtree.

The method makes desicion according to the maximum bounding rectangle of the child, the axis along which the intermediate node is being split and the coordinate at which the node is being split.

Parameters
childA child of the node that is being split.
axisThe axis along which the node is being split.
cutThe coordinate at which the node is being split.

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