The nested set structure is well-known and involves using left and right values to denote the relative heirarchy of nodes on one axis.

Is there a generalization of this structure to higher dimensions? For example, a 2-dimensional case could be used for describing nested bounding boxes for the elements of an image. The bounding box for a car contains bounding boxes for the wheels, the spokes of the wheels, and so on.

Is it reasonable to simply extend the basic form by adding top and bottom columns and checking for nesting with similar comparisons? Does this work for even higher dimensions? Any non-obvious caveats to this approach?

Edit: perhaps I should clarify, I'm aiming for RDBMS/SQL approaches here.

  • For any number of dimensions set A contain set B if for every axis projection of A contain projection of B. If one or more projections intersects then A intersect B. If none of projections of A contain or intersect any projection of B then A and B has nullary intersection. – Kondybas May 29 '18 at 18:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.