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

◆ overlap4D()

static bool overlap4D ( const TboxNode nodebox,
const TBox query 
)
static

Can any box from nodebox overlap with the query?

A span s1 contains a span s2 if s1.lower <= s2.lower and s1.upper >= s2.upper. Therefore, given a query box and a node box, a

Two spans overlap if the maximum of their lower bound is greater than or equal to the minimum of their upper bound. Therefore, given a query box and a node box, the query box may overlap a box in the node box if for each dimension X and T

  • nodebox->left.span.lower (the minimum of the lower bounds in the node box) <= query->span.upper (the upper bound of the query).
  • nodebox->right.span.upper (the maximum of the upper bounds in the node box) <= query->span.lower (the lower bound of the query).

Continuing with the example at the top of this file, if TboxNode is

left = TBOXFLOAT XT([3, 7],[2001-01-03, 2001-01-07])
right = TBOXFLOAT XT([5, 9],[2001-01-05, 2001-01-09])

a query `TBOXFLOAT XT([2, 4],[2001-01-02, 2001-01-04]) satisfies the above condition.