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

◆ node_choose()

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

Chooses the best child node for inserting a new STBox in an RTree.

This function determines the most suitable child node within an RTree node for inserting a new STBox. 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 STBox 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 STBox structure that is being inserted.
[in]nodePointer to the RTreeNode structure containing the child nodes.
Returns
The index of the chosen child node for insertion.