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

◆ node_swap()

static void node_swap ( const RTree rtree,
RTreeNode node,
int  i,
int  j 
)
static

Swaps two bounding boxes and their associated data within an RTree node.

The function exchanges the positions of two bounding boxes within a single RTree node. If the node is a leaf, it also swaps the associated IDs. For internal nodes, it swaps the pointers to child nodes. The function is useful for reordering elements within a node.

Parameters
[in]rtreePointer to the RTree structure
[in,out]nodePointer to the node containing the bounding boxes and associated data.
[in]iThe index of the first bounding box to be swapped.
[in]jThe index of the second bounding box to be swapped.