Skip to content

feat(bindings): tnumber × {numspan, tbox} topological predicates#37

Closed
estebanzimanyi wants to merge 1 commit into
feat/temporal-similarityfrom
feat/tnumber-numspan-tbox-topops
Closed

feat(bindings): tnumber × {numspan, tbox} topological predicates#37
estebanzimanyi wants to merge 1 commit into
feat/temporal-similarityfrom
feat/tnumber-numspan-tbox-topops

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

Summary

Adds 32 ScalarFunction registrations for the tnumber-vs-box topological surface, backed by 16 wrapper functions:

Operator Pairs
@>, <@, &&, `- -`
@>, <@, &&, `- -`

MEOS bindings (16)

contains/contained/overlaps/adjacent_tnumber_numspan + _numspan_tnumber + _tnumber_tbox + _tbox_tnumber — all available in MEOS public API.

Two new templated helpers added (TempBoxBoolPred, BoxTempBoolPred) for handling blobs-as-fixed-size-struct (Span / TBox).

Smoke test

SELECT tint '[1@01-01, 5@01-05]' @> intspan '[2, 4]';                          -- true
SELECT intspan '[1, 10]' @> tint '[2@01-01, 4@01-05]';                         -- true
SELECT tfloat '[1@01-01, 5@01-05]' && floatspan '[3, 8]';                      -- true
SELECT tint '[1@01-01, 5@01-05]' -|- intspan '[6, 10]';                        -- true
SELECT tint '[1@01-01, 10@01-10]' @> tbox 'TBOXINT XT([2,5],[01-02,01-05])';   -- true

Test plan

Dependencies

Stacked on PR #36 (temporal similarity). Merge order: #27#29#30#31#32#33#34#35#36 → this.

Adds 32 ScalarFunction registrations for the tnumber-vs-box
topological surface, backed by 16 wrapper functions:

  4 ops (@>, <@, &&, -|-) × 8 type-pair shapes:
    tnumber × numspan, numspan × tnumber  (intspan↔tint, floatspan↔tfloat)
    tnumber × tbox,    tbox × tnumber     (both base types)

MEOS bindings (16 total):
  contains/contained/overlaps/adjacent_tnumber_numspan
  contains/contained/overlaps/adjacent_numspan_tnumber
  contains/contained/overlaps/adjacent_tnumber_tbox
  contains/contained/overlaps/adjacent_tbox_tnumber

Two new templated helpers added (TempBoxBoolPred, BoxTempBoolPred)
for blob-as-fixed-size-struct (Span / TBox) handling.

Smoke test:
  SELECT tint '[1@01-01, 5@01-05]' @> intspan '[2, 4]';                       -- true
  SELECT intspan '[1, 10]' @> tint '[2@01-01, 4@01-05]';                      -- true
  SELECT tfloat '[1@01-01, 5@01-05]' && floatspan '[3, 8]';                   -- true
  SELECT tint '[1@01-01, 5@01-05]' -|- intspan '[6, 10]';                     -- true
  SELECT tint '[1@01-01, 10@01-10]' @> tbox 'TBOXINT XT([2,5],[01-02,01-05])'; -- true

Stacked on PR #36 (temporal similarity).

Full suite passes (747 assertions, 13 test cases).
@estebanzimanyi

Copy link
Copy Markdown
Member Author

Consolidated into #40 (tnumber × {numspan, tbox} bounding-box predicates — topo + position combined).

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