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

◆ node_choose_least_enlargement()

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

Return the child node that requires the least enlargement to accommodate a new bounding box.

The function iterates through the child nodes of a given node to determine which child node's bounding box would need the least enlargement to include a new bounding box. The function calculates the area of each node's bounding box before and after union with the new bounding box and selects the one with the smallest area increase.

Parameters
[in]nodePointer to the node containing the child nodes
[in]boxPointer to the bounding box that is being inserted or considered
[in]rtreePointer to the RTree structure, which provides the method for calculating areas
Returns
The index of the child node that requires the least enlargement