Skip to content

Implement STBox.expand_stbox - #85

Merged
estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:fix/stbox-expand
Jul 28, 2026
Merged

Implement STBox.expand_stbox#85
estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:fix/stbox-expand

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

expand_stbox implements the expansion of this with other, returning the smallest box containing both.

The body calls stbox_expand, which expands the second box with the first one in place. That function is public since MobilityDB#1525, so the binding reaches it directly. The signature is an instance method taking a single box, since expand_stbox is applied to this.

The test covers the disjoint case, STBox X((1, 1),(2, 2)) expanded with STBox X((3, 3),(4, 4)) giving STBox X((1, 1),(4, 4)), together with a contained case and the Z and XT variants.

The method returned a plain copy of "this" and ignored "other" entirely,
so callers silently got a wrong box. The call doing the work was commented
out and named stbox_expand_space, whose signature takes a double rather
than a box.

Call stbox_expand, which expands the second box with the first one, and
drop the unused leading parameter. Add a test covering the disjoint case,
which the previous body could not produce.
@estebanzimanyi
estebanzimanyi merged commit 7c3f393 into MobilityDB:main Jul 28, 2026
1 of 3 checks passed
@estebanzimanyi
estebanzimanyi deleted the fix/stbox-expand branch July 29, 2026 05:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant