MobilityDB 1.3
Loading...
Searching...
No Matches

◆ node_choose()

static int node_choose ( const RTree rtree,
const void *  box,
const RTreeNode node 
)
static

Returns the best child node for inserting a new bounding box in an RTree.

The function determines the most suitable child node within a node for inserting a new bounding box. It first checks if the new box can be added to any child node without requiring the expansion of its bounding box. If none of the child nodes can accommodate the new bounding box without expansion, the function falls back to selecting the node that requires the least enlargement.

Parameters
[in]rtreePointer to the RTree structure, providing access to the overall RTree configuration
[in]boxPointer to the bounding box that is being inserted
[in]nodePointer to the node containing the child nodes
Returns
The index of the chosen child node for insertion