MobilityDB 1.1

◆ stbox_xmin_cmp()

static int stbox_xmin_cmp ( const STBox box1,
const STBox box2 
)
static

Determine which half a 4D-mapped temporal box falls into, relative to the centroid and the level number.

Halves are numbered 0 and 1, and depending on the value of level number modulo 4 is even or odd, the halves will be as follows:

----+----
0 | 1
----+----

or

---------
1
---------
0
---------

where the lower bound of the splitting dimension is the horizontal axis and the upper bound is the vertical axis.

Boxes whose lower/upper bound of the splitting dimension is equal to the centroid bound (including their inclusive flag) may get classified into either node depending on where they happen to fall in the sorted list. This is okay as long as the inner_consistent function descends into both sides for such cases. This is better than the alternative of trying to have an exact boundary, because it keeps the tree balanced even when we have many instances of the same box value. In this way, we should never trigger the allTheSame logic.

Comparator of temporal boxes based on their xmin value