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

When descending a RectangleTree to insert a point, we need to have a way to choose a child node when the point isn't enclosed by any of them. More...

#include <r_star_tree_descent_heuristic.hpp>

Static Public Member Functions

template<typename TreeType >
static size_t ChooseDescentNode (const TreeType *node, const size_t point)
 Evaluate the node using a heuristic. More...
 
template<typename TreeType >
static size_t ChooseDescentNode (const TreeType *node, const TreeType *insertedNode)
 We simplify this to the same code as is used in the regular R tree, since the inserted node should always be above the leaf level. More...
 

Detailed Description

When descending a RectangleTree to insert a point, we need to have a way to choose a child node when the point isn't enclosed by any of them.

This heuristic is used to do so using the rules for the R* tree.

Member Function Documentation

◆ ChooseDescentNode() [1/2]

template<typename TreeType >
size_t mlpack::tree::RStarTreeDescentHeuristic::ChooseDescentNode ( const TreeType *  node,
const size_t  point 
)
inlinestatic

Evaluate the node using a heuristic.

The heuristic guarantees two things:

  1. If point is contained in (or on) bound, the value returned is zero.
  2. If the point is not contained in (or on) bound, the value returned is greater than zero.
Parameters
nodeThe node that is being evaluated.
pointThe index of the point that is being inserted.

◆ ChooseDescentNode() [2/2]

template<typename TreeType >
size_t mlpack::tree::RStarTreeDescentHeuristic::ChooseDescentNode ( const TreeType *  node,
const TreeType *  insertedNode 
)
inlinestatic

We simplify this to the same code as is used in the regular R tree, since the inserted node should always be above the leaf level.

If the tree is eventually changed to support rectangles, this could be changed to match the above code; however, the paper's explanation for their algorithm seems to indicate the above is more for points than for rectangles.


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