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

◆ node_qsort()

static void node_qsort ( const RTree rtree,
RTreeNode node,
int  index,
bool  upper,
int  s,
int  e 
)
static

Sort the bounding boxes within an RTree node using the QuickSort algorithm.

The function recursively sorts the bounding boxes within a given range in an RTree node along a particular axis. It uses the QuickSort algorithm to order the bounding boxes based on their axis values, either upper or lower, as provided by the get_axis function in the RTree structure.

Parameters
[in]rtreePointer to the RTree structure which provides the function for retrieving axis values
[in,out]nodePointer to the node containing the bounding boxes to be sorted
[in]indexThe axis index along which to sort the bounding boxes
[in]upperA Boolean indicating whether to sort by upper or lower axis value
[in]sThe starting index of the range to be sorted in the node->boxes array
[in]eThe ending index (exclusive) of the range to be sorted in the node->boxes array