Skip to content

Commit

Permalink
Fix nearest approach distance (#423)
Browse files Browse the repository at this point in the history
  • Loading branch information
estebanzimanyi authored Jan 16, 2024
1 parent a3d6e3f commit 6cc320c
Show file tree
Hide file tree
Showing 21 changed files with 376 additions and 330 deletions.
64 changes: 0 additions & 64 deletions meos/include/general/tnumber_distance.h

This file was deleted.

11 changes: 6 additions & 5 deletions meos/include/meos.h
Original file line number Diff line number Diff line change
Expand Up @@ -1123,7 +1123,6 @@ extern GBOX *stbox_to_gbox(const STBox *box);
extern BOX3D *stbox_to_box3d(const STBox *box);
extern GSERIALIZED *stbox_to_geo(const STBox *box);
extern Span *stbox_to_tstzspan(const STBox *box);
extern TBox *tstzspanset_to_tbox(const SpanSet *ss);
extern Span *tbox_to_intspan(const TBox *box);
extern Span *tbox_to_floatspan(const TBox *box);
extern Span *tbox_to_tstzspan(const TBox *box);
Expand Down Expand Up @@ -1873,12 +1872,14 @@ extern Temporal *distance_tpoint_point(const Temporal *temp, const GSERIALIZED *
extern Temporal *distance_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2);
extern double nad_stbox_geo(const STBox *box, const GSERIALIZED *gs);
extern double nad_stbox_stbox(const STBox *box1, const STBox *box2);
extern double nad_tbox_tbox(const TBox *box1, const TBox *box2);
extern double nad_tfloat_float(const Temporal *temp, double d);
extern double nad_tfloat_tfloat(const Temporal *temp1, const Temporal *temp2);
extern int nad_tint_int(const Temporal *temp, int i);
extern int nad_tint_tbox(const Temporal *temp, const TBox *box);
extern int nad_tint_tint(const Temporal *temp1, const Temporal *temp2);
extern double nad_tnumber_tbox(const Temporal *temp, const TBox *box);
extern int nad_tintbox_tintbox(const TBox *box1, const TBox *box2);
extern double nad_tfloat_float(const Temporal *temp, double d);
extern double nad_tfloat_tfloat(const Temporal *temp1, const Temporal *temp2);
extern double nad_tfloat_tbox(const Temporal *temp, const TBox *box);
extern double nad_tfloatbox_tfloatbox(const TBox *box1, const TBox *box2);
extern double nad_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs);
extern double nad_tpoint_stbox(const Temporal *temp, const STBox *box);
extern double nad_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2);
Expand Down
15 changes: 11 additions & 4 deletions meos/include/meos_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -288,15 +288,19 @@ extern SpanSet *spanset_make_free(Span *spans, int count, bool normalize, bool o

/* Conversion functions for set and span types */

extern Set *dateset_tstzset(const Set *s);
extern Span *datespan_tstzspan(const Span *s);
extern SpanSet *datespanset_tstzspanset(const SpanSet *ss);
extern Span *intspan_floatspan(const Span *s);
extern SpanSet *intspanset_floatspanset(const SpanSet *ss);
extern Set *floatset_intset(const Set *s);
extern Span *floatspan_intspan(const Span *s);
extern SpanSet *floatspanset_intspanset(const SpanSet *ss);
extern Set *intset_floatset(const Set *s);
extern Span *intspan_floatspan(const Span *s);
extern SpanSet *intspanset_floatspanset(const SpanSet *ss);
extern Span *set_span(const Set *s);
extern SpanSet *set_spanset(const Set *s);
extern SpanSet *span_spanset(const Span *s);
extern Set *tstzset_dateset(const Set *s);
extern Span *tstzspan_datespan(const Span *s);
extern SpanSet *tstzspanset_datespanset(const SpanSet *ss);
extern void value_set_span(Datum value, meosType basetype, Span *s);
Expand Down Expand Up @@ -889,8 +893,11 @@ extern TSequenceSet *tnumberseqset_delta_value(const TSequenceSet *ss);

/* Distance functions for temporal types */

extern Temporal *distance_tnumber_number(const Temporal *temp, Datum value, meosType valuetype, meosType restype);
extern double nad_tnumber_number(const Temporal *temp, Datum value, meosType basetype);
extern Temporal *distance_tnumber_number(const Temporal *temp, Datum value);
extern Datum nad_tbox_tbox(const TBox *box1, const TBox *box2);
extern Datum nad_tnumber_number(const Temporal *temp, Datum value);
extern Datum nad_tnumber_tbox(const Temporal *temp, const TBox *box);
extern Datum nad_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2);

/*****************************************************************************
* Spatial functions for temporal points
Expand Down
Loading

0 comments on commit 6cc320c

Please sign in to comment.