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

Sorts STBoxes within an RTree node using the QuickSort algorithm.

This function recursively sorts the STBoxes within a specified range in an RTree node along a particular axis. It uses the QuickSort algorithm to order the STBoxes 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 RTreeNode structure containing the STBoxes to be sorted.
[in]indexThe axis index along which to sort the STBoxes.
[in]upperBoolean flag 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.