Can any box from nodebox contain 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 box in the node box may contain the query box if for each dimension X and T
nodebox->left.span.lower
(the minimum of the lower bounds in the node box) <= query->span.lower
(the lower bound of the query).
nodebox->right.span.upper
(the maximum of the upper bounds in the node box) >= query->span.upper
(the upper 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([3, 4],[2001-01-02, 2001-01-04]) satisfies the above condition.