From e10ff466fc50aaf8027ff9c679bf4be9037bf4be Mon Sep 17 00:00:00 2001 From: Diviloper Date: Fri, 29 Dec 2023 10:59:41 +0100 Subject: [PATCH] Sync with MEOS --- pymeos/pymeos/boxes/tbox.py | 6 +- pymeos/pymeos/collections/time/tstzspanset.py | 12 +- pymeos/pymeos/temporal/temporal.py | 10 +- pymeos/tests/boxes/tbox_test.py | 6 +- pymeos_cffi/pymeos_cffi/__init__.py | 212 +- pymeos_cffi/pymeos_cffi/builder/meos.h | 258 ++- pymeos_cffi/pymeos_cffi/functions.py | 1975 +++++++++++++++-- 7 files changed, 2233 insertions(+), 246 deletions(-) diff --git a/pymeos/pymeos/boxes/tbox.py b/pymeos/pymeos/boxes/tbox.py index 44fc577a..f6de84b8 100644 --- a/pymeos/pymeos/boxes/tbox.py +++ b/pymeos/pymeos/boxes/tbox.py @@ -666,9 +666,9 @@ def round(self, max_decimals: int = 0) -> TBox: MEOS Functions: tbox_round """ - new_inner = tbox_copy(self._inner) - tbox_round(new_inner, max_decimals) - return TBox(_inner=new_inner) + if not self._is_float(): + return TBox(_inner=tbox_copy(self._inner)) + return TBox(_inner=tbox_round(self._inner, max_decimals)) # ------------------------- Set Operations -------------------------------- def union(self, other: TBox, strict: Optional[bool] = True) -> TBox: diff --git a/pymeos/pymeos/collections/time/tstzspanset.py b/pymeos/pymeos/collections/time/tstzspanset.py index 72c3644c..37ed60e1 100644 --- a/pymeos/pymeos/collections/time/tstzspanset.py +++ b/pymeos/pymeos/collections/time/tstzspanset.py @@ -129,9 +129,9 @@ def start_timestamp(self) -> datetime: A :class:`datetime` instance MEOS Functions: - tstzspanset_start_timestamp + tstzspanset_start_timestamptz """ - return timestamptz_to_datetime(tstzspanset_start_timestamp(self._inner)) + return timestamptz_to_datetime(tstzspanset_start_timestamptz(self._inner)) def end_timestamp(self) -> datetime: """ @@ -140,9 +140,9 @@ def end_timestamp(self) -> datetime: A :class:`datetime` instance MEOS Functions: - tstzspanset_end_timestamp + tstzspanset_end_timestamptz """ - return timestamptz_to_datetime(tstzspanset_end_timestamp(self._inner)) + return timestamptz_to_datetime(tstzspanset_end_timestamptz(self._inner)) def timestamp_n(self, n: int) -> datetime: """ @@ -151,11 +151,11 @@ def timestamp_n(self, n: int) -> datetime: A :class:`datetime` instance MEOS Functions: - spanset_timestamp_n + tstzspanset_timestamptz_n """ if n < 0 or n >= self.num_timestamps(): raise IndexError(f"Index {n} out of bounds") - return timestamptz_to_datetime(tstzspanset_timestamp_n(self._inner, n + 1)) + return timestamptz_to_datetime(tstzspanset_timestamptz_n(self._inner, n + 1)) def timestamps(self) -> List[datetime]: """ diff --git a/pymeos/pymeos/temporal/temporal.py b/pymeos/pymeos/temporal/temporal.py index ad3f2d91..50a28034 100644 --- a/pymeos/pymeos/temporal/temporal.py +++ b/pymeos/pymeos/temporal/temporal.py @@ -453,7 +453,7 @@ def start_timestamp(self) -> datetime: MEOS Functions: temporal_start_timestamps """ - return timestamptz_to_datetime(temporal_start_timestamp(self._inner)) + return timestamptz_to_datetime(temporal_start_timestamptz(self._inner)) def end_timestamp(self) -> datetime: """ @@ -462,16 +462,16 @@ def end_timestamp(self) -> datetime: MEOS Functions: temporal_end_timestamps """ - return timestamptz_to_datetime(temporal_end_timestamp(self._inner)) + return timestamptz_to_datetime(temporal_end_timestamptz(self._inner)) def timestamp_n(self, n: int) -> datetime: """ Returns the n-th timestamp in `self`. (0-based) MEOS Functions: - temporal_timestamp_n + temporal_timestamptz_n """ - return timestamptz_to_datetime(temporal_timestamp_n(self._inner, n + 1)) + return timestamptz_to_datetime(temporal_timestamptz_n(self._inner, n + 1)) def timestamps(self) -> List[datetime]: """ @@ -1251,7 +1251,7 @@ def time_split_n(self, n: int) -> List[TG]: """ if self.end_timestamp() == self.start_timestamp(): return [self] - st = temporal_start_timestamp(self._inner) + st = temporal_start_timestamptz(self._inner) dt = timedelta_to_interval((self.end_timestamp() - self.start_timestamp()) / n) fragments, times, count = temporal_time_split(self._inner, dt, st) from ..factory import _TemporalFactory diff --git a/pymeos/tests/boxes/tbox_test.py b/pymeos/tests/boxes/tbox_test.py index 963795f3..c654fd40 100644 --- a/pymeos/tests/boxes/tbox_test.py +++ b/pymeos/tests/boxes/tbox_test.py @@ -808,7 +808,7 @@ def test_shift_scale_time(self, tbox, delta, duration, expected): TBox( "TBOXFLOAT XT([1.123456789,2.123456789],[2019-09-01, 2019-09-02])" ), - TBox("TBOXFLOAT XT([1.12,2.12],[2019-09-01, 2019-09-03])"), + TBox("TBOXFLOAT XT([1.12,2.12],[2019-09-01, 2019-09-02])"), ), ( TBox("TBOXINT X([1,2])"), @@ -816,13 +816,13 @@ def test_shift_scale_time(self, tbox, delta, duration, expected): ), ( TBox("TBOXINT XT([1,2],[2019-09-01, 2019-09-02])"), - TBox("TBOXINT XT([1,2],[2019-09-01, 2019-09-03])"), + TBox("TBOXINT XT([1,2],[2019-09-01, 2019-09-02])"), ), ], ids=["TBoxFloat X", "TBoxFloat XT", "TBoxInt X", "TBoxInt XT"], ) def test_round(self, tbox, expected): - assert tbox.round(max_decimals=2) + assert tbox.round(max_decimals=2) == expected class TestTBoxTopologicalFunctions(TestTBox): diff --git a/pymeos_cffi/pymeos_cffi/__init__.py b/pymeos_cffi/pymeos_cffi/__init__.py index 1cf3bc06..af9dcb6b 100644 --- a/pymeos_cffi/pymeos_cffi/__init__.py +++ b/pymeos_cffi/pymeos_cffi/__init__.py @@ -98,7 +98,7 @@ "pg_timestamptz_out", "pg_timestamptz_to_char", "pg_to_date", - "pg_to_timestamp", + "pg_to_timestamptz", "text2cstring", "text_out", "geography_from_hexewkb", @@ -275,11 +275,11 @@ "tstzspan_lower", "tstzspan_upper", "tstzspanset_duration", - "tstzspanset_end_timestamp", + "tstzspanset_end_timestamptz", "tstzspanset_lower", "tstzspanset_num_timestamps", - "tstzspanset_start_timestamp", - "tstzspanset_timestamp_n", + "tstzspanset_start_timestamptz", + "tstzspanset_timestamptz_n", "tstzspanset_timestamps", "tstzspanset_upper", "bigintset_shift_scale", @@ -730,6 +730,10 @@ "tbox_xmax_inc", "tbox_xmin", "tbox_xmin_inc", + "tboxfloat_xmax", + "tboxfloat_xmin", + "tboxint_xmax", + "tboxint_xmin", "stbox_expand_space", "stbox_expand_time", "stbox_get_space", @@ -857,7 +861,7 @@ "temporal_duration", "temporal_end_instant", "temporal_end_sequence", - "temporal_end_timestamp", + "temporal_end_timestamptz", "temporal_hash", "temporal_instant_n", "temporal_instants", @@ -872,11 +876,11 @@ "temporal_sequences", "temporal_start_instant", "temporal_start_sequence", - "temporal_start_timestamp", + "temporal_start_timestamptz", "temporal_stops", "temporal_subtype", "temporal_time", - "temporal_timestamp_n", + "temporal_timestamptz_n", "temporal_timestamps", "tfloat_end_value", "tfloat_max_value", @@ -1038,6 +1042,153 @@ "tne_tpoint_point", "tne_tint_int", "tne_ttext_text", + "adjacent_numspan_tnumber", + "adjacent_stbox_tpoint", + "adjacent_tbox_tnumber", + "adjacent_temporal_temporal", + "adjacent_temporal_tstzspan", + "adjacent_tnumber_numspan", + "adjacent_tnumber_tbox", + "adjacent_tnumber_tnumber", + "adjacent_tpoint_stbox", + "adjacent_tpoint_tpoint", + "adjacent_tstzspan_temporal", + "contained_numspan_tnumber", + "contained_stbox_tpoint", + "contained_tbox_tnumber", + "contained_temporal_temporal", + "contained_temporal_tstzspan", + "contained_tnumber_numspan", + "contained_tnumber_tbox", + "contained_tnumber_tnumber", + "contained_tpoint_stbox", + "contained_tpoint_tpoint", + "contained_tstzspan_temporal", + "contains_numspan_tnumber", + "contains_stbox_tpoint", + "contains_tbox_tnumber", + "contains_temporal_tstzspan", + "contains_temporal_temporal", + "contains_tnumber_numspan", + "contains_tnumber_tbox", + "contains_tnumber_tnumber", + "contains_tpoint_stbox", + "contains_tpoint_tpoint", + "contains_tstzspan_temporal", + "overlaps_numspan_tnumber", + "overlaps_stbox_tpoint", + "overlaps_tbox_tnumber", + "overlaps_temporal_temporal", + "overlaps_temporal_tstzspan", + "overlaps_tnumber_numspan", + "overlaps_tnumber_tbox", + "overlaps_tnumber_tnumber", + "overlaps_tpoint_stbox", + "overlaps_tpoint_tpoint", + "overlaps_tstzspan_temporal", + "same_numspan_tnumber", + "same_stbox_tpoint", + "same_tbox_tnumber", + "same_temporal_temporal", + "same_temporal_tstzspan", + "same_tnumber_numspan", + "same_tnumber_tbox", + "same_tnumber_tnumber", + "same_tpoint_stbox", + "same_tpoint_tpoint", + "same_tstzspan_temporal", + "above_stbox_tpoint", + "above_tpoint_stbox", + "above_tpoint_tpoint", + "after_stbox_tpoint", + "after_tbox_tnumber", + "after_temporal_tstzspan", + "after_temporal_temporal", + "after_tnumber_tbox", + "after_tnumber_tnumber", + "after_tpoint_stbox", + "after_tpoint_tpoint", + "after_tstzspan_temporal", + "back_stbox_tpoint", + "back_tpoint_stbox", + "back_tpoint_tpoint", + "before_stbox_tpoint", + "before_tbox_tnumber", + "before_temporal_tstzspan", + "before_temporal_temporal", + "before_tnumber_tbox", + "before_tnumber_tnumber", + "before_tpoint_stbox", + "before_tpoint_tpoint", + "before_tstzspan_temporal", + "below_stbox_tpoint", + "below_tpoint_stbox", + "below_tpoint_tpoint", + "front_stbox_tpoint", + "front_tpoint_stbox", + "front_tpoint_tpoint", + "left_stbox_tpoint", + "left_tbox_tnumber", + "left_numspan_tnumber", + "left_tnumber_numspan", + "left_tnumber_tbox", + "left_tnumber_tnumber", + "left_tpoint_stbox", + "left_tpoint_tpoint", + "overabove_stbox_tpoint", + "overabove_tpoint_stbox", + "overabove_tpoint_tpoint", + "overafter_stbox_tpoint", + "overafter_tbox_tnumber", + "overafter_temporal_tstzspan", + "overafter_temporal_temporal", + "overafter_tnumber_tbox", + "overafter_tnumber_tnumber", + "overafter_tpoint_stbox", + "overafter_tpoint_tpoint", + "overafter_tstzspan_temporal", + "overback_stbox_tpoint", + "overback_tpoint_stbox", + "overback_tpoint_tpoint", + "overbefore_stbox_tpoint", + "overbefore_tbox_tnumber", + "overbefore_temporal_tstzspan", + "overbefore_temporal_temporal", + "overbefore_tnumber_tbox", + "overbefore_tnumber_tnumber", + "overbefore_tpoint_stbox", + "overbefore_tpoint_tpoint", + "overbefore_tstzspan_temporal", + "overbelow_stbox_tpoint", + "overbelow_tpoint_stbox", + "overbelow_tpoint_tpoint", + "overfront_stbox_tpoint", + "overfront_tpoint_stbox", + "overfront_tpoint_tpoint", + "overleft_numspan_tnumber", + "overleft_stbox_tpoint", + "overleft_tbox_tnumber", + "overleft_tnumber_numspan", + "overleft_tnumber_tbox", + "overleft_tnumber_tnumber", + "overleft_tpoint_stbox", + "overleft_tpoint_tpoint", + "overright_numspan_tnumber", + "overright_stbox_tpoint", + "overright_tbox_tnumber", + "overright_tnumber_numspan", + "overright_tnumber_tbox", + "overright_tnumber_tnumber", + "overright_tpoint_stbox", + "overright_tpoint_tpoint", + "right_numspan_tnumber", + "right_stbox_tpoint", + "right_tbox_tnumber", + "right_tnumber_numspan", + "right_tnumber_tbox", + "right_tnumber_tnumber", + "right_tpoint_stbox", + "right_tpoint_tpoint", "tand_bool_tbool", "tand_tbool_bool", "tand_tbool_tbool", @@ -1118,7 +1269,7 @@ "tpoint_stboxes", "tpoint_trajectory", "geo_expand_space", - "geo_to_tpoint", + "geomeas_to_tpoint", "tgeogpoint_to_tgeompoint", "tgeompoint_to_tgeogpoint", "tpoint_AsMVTGeom", @@ -1127,7 +1278,7 @@ "tpoint_round", "tpointarr_round", "tpoint_set_srid", - "tpoint_to_geo_meas", + "tpoint_tfloat_to_geomeas", "econtains_geo_tpoint", "edisjoint_tpoint_geo", "edisjoint_tpoint_tpoint", @@ -1180,6 +1331,7 @@ "int_bucket", "intspan_bucket_list", "tstzspan_bucket_list", + "stbox_tile", "stbox_tile_list", "tintbox_tile_list", "tfloatbox_tile_list", @@ -1191,8 +1343,15 @@ "tint_value_time_split", "tpoint_space_split", "tpoint_space_time_split", - "meostype_name", + "temptype_subtype", + "temptype_subtype_all", + "tempsubtype_name", + "tempsubtype_from_string", "meosoper_name", + "meosoper_from_string", + "interptype_name", + "interptype_from_string", + "meostype_name", "temptype_basetype", "settype_basetype", "spantype_basetype", @@ -1290,7 +1449,9 @@ "set_start_value", "set_value_n", "set_values", + "spanset_lower", "spanset_mem_size", + "spanset_upper", "spatialset_set_stbox", "value_set_span", "datespan_set_tstzspan", @@ -1542,7 +1703,7 @@ "tinstant_value_copy", "tinstant_values", "tsequence_duration", - "tsequence_end_timestamp", + "tsequence_end_timestamptz", "tsequence_hash", "tsequence_instants", "tsequence_max_instant", @@ -1554,13 +1715,13 @@ "tsequence_set_bbox", "tsequence_expand_bbox", "tsequenceset_expand_bbox", - "tsequence_start_timestamp", + "tsequence_start_timestamptz", "tsequence_time", "tsequence_timestamps", "tsequence_value_at_timestamptz", "tsequence_values", "tsequenceset_duration", - "tsequenceset_end_timestamp", + "tsequenceset_end_timestamptz", "tsequenceset_hash", "tsequenceset_inst_n", "tsequenceset_instants", @@ -1574,10 +1735,10 @@ "tsequenceset_sequences", "tsequenceset_sequences_p", "tsequenceset_set_bbox", - "tsequenceset_start_timestamp", + "tsequenceset_start_timestamptz", "tsequenceset_time", "tsequenceset_timespan", - "tsequenceset_timestamp_n", + "tsequenceset_timestamptz_n", "tsequenceset_timestamps", "tsequenceset_value_at_timestamptz", "tsequenceset_values", @@ -1743,5 +1904,26 @@ "temporal_compact", "tsequence_compact", "tsequenceset_compact", + "tbool_tand_transfn", + "tbool_tor_transfn", + "temporal_tagg_finalfn", + "temporal_tcount_transfn", + "tfloat_tmax_transfn", + "tfloat_tmin_transfn", + "tfloat_tsum_transfn", + "tfloat_wmax_transfn", + "tfloat_wmin_transfn", + "tfloat_wsum_transfn", + "tint_tmin_transfn", + "tint_tmax_transfn", + "tint_tsum_transfn", + "tint_wmax_transfn", + "tint_wmin_transfn", + "tint_wsum_transfn", + "tnumber_tavg_finalfn", + "tnumber_tavg_transfn", + "tnumber_wavg_transfn", + "ttext_tmin_transfn", + "ttext_tmax_transfn", "tnumber_value_split", ] diff --git a/pymeos_cffi/pymeos_cffi/builder/meos.h b/pymeos_cffi/pymeos_cffi/builder/meos.h index 169d60f2..dae3db17 100644 --- a/pymeos_cffi/pymeos_cffi/builder/meos.h +++ b/pymeos_cffi/pymeos_cffi/builder/meos.h @@ -3,6 +3,7 @@ //#include //#include +//#include typedef char *Pointer; typedef uintptr_t Datum; @@ -402,6 +403,14 @@ typedef struct int16 flags; } STBox; +typedef enum +{ + ANYTEMPSUBTYPE = 0, + TINSTANT = 1, + TSEQUENCE = 2, + TSEQUENCESET = 3, +} tempSubtype; + typedef enum { INTERP_NONE = 0, @@ -572,7 +581,7 @@ extern DateADT pg_timestamptz_date(TimestampTz t); extern char *pg_timestamptz_out(TimestampTz dt); extern text *pg_timestamptz_to_char(TimestampTz dt, text *fmt); extern DateADT pg_to_date(text *date_txt, text *fmt); -extern TimestampTz pg_to_timestamp(text *date_txt, text *fmt); +/* extern TimestampTz pg_to_timestamptz(text *date_txt, text *fmt); (undefined) */ extern char *text2cstring(const text *textptr); extern char *text_out(const text *txt); @@ -730,15 +739,15 @@ extern uint64 span_hash_extended(const Span *s, uint64 seed); extern bool span_lower_inc(const Span *s); extern bool span_upper_inc(const Span *s); extern double span_width(const Span *s); -extern Span *spanset_end_span(const SpanSet *ss); +extern const Span *spanset_end_span(const SpanSet *ss); extern uint32 spanset_hash(const SpanSet *ss); extern uint64 spanset_hash_extended(const SpanSet *ss, uint64 seed); extern bool spanset_lower_inc(const SpanSet *ss); extern int spanset_num_spans(const SpanSet *ss); extern Span *spanset_span(const SpanSet *ss); -extern Span *spanset_span_n(const SpanSet *ss, int i); +extern const Span *spanset_span_n(const SpanSet *ss, int i); extern const Span **spanset_spans(const SpanSet *ss); -extern Span *spanset_start_span(const SpanSet *ss); +extern const Span *spanset_start_span(const SpanSet *ss); extern bool spanset_upper_inc(const SpanSet *ss); extern double spanset_width(const SpanSet *ss, bool boundspan); extern STBox *spatialset_to_stbox(const Set *s); @@ -754,11 +763,11 @@ extern Interval *tstzspan_duration(const Span *s); extern TimestampTz tstzspan_lower(const Span *s); extern TimestampTz tstzspan_upper(const Span *s); extern Interval *tstzspanset_duration(const SpanSet *ss, bool boundspan); -extern TimestampTz tstzspanset_end_timestamp(const SpanSet *ss); +extern TimestampTz tstzspanset_end_timestamptz(const SpanSet *ss); extern TimestampTz tstzspanset_lower(const SpanSet *ss); extern int tstzspanset_num_timestamps(const SpanSet *ss); -extern TimestampTz tstzspanset_start_timestamp(const SpanSet *ss); -extern bool tstzspanset_timestamp_n(const SpanSet *ss, int n, TimestampTz *result); +extern TimestampTz tstzspanset_start_timestamptz(const SpanSet *ss); +extern bool tstzspanset_timestamptz_n(const SpanSet *ss, int n, TimestampTz *result); extern TimestampTz *tstzspanset_timestamps(const SpanSet *ss, int *count); extern TimestampTz tstzspanset_upper(const SpanSet *ss); @@ -1221,6 +1230,10 @@ extern bool tbox_xmax(const TBox *box, double *result); extern bool tbox_xmax_inc(const TBox *box, bool *result); extern bool tbox_xmin(const TBox *box, double *result); extern bool tbox_xmin_inc(const TBox *box, bool *result); +extern bool tboxfloat_xmax(const TBox *box, double *result); +extern bool tboxfloat_xmin(const TBox *box, double *result); +extern bool tboxint_xmax(const TBox *box, int *result); +extern bool tboxint_xmin(const TBox *box, int *result); extern STBox *stbox_expand_space(const STBox *box, double d); extern STBox *stbox_expand_time(const STBox *box, const Interval *interval); @@ -1358,7 +1371,7 @@ extern bool *tbool_values(const Temporal *temp, int *count); extern Interval *temporal_duration(const Temporal *temp, bool boundspan); extern const TInstant *temporal_end_instant(const Temporal *temp); extern TSequence *temporal_end_sequence(const Temporal *temp); -extern TimestampTz temporal_end_timestamp(const Temporal *temp); +extern TimestampTz temporal_end_timestamptz(const Temporal *temp); extern uint32 temporal_hash(const Temporal *temp); extern const TInstant *temporal_instant_n(const Temporal *temp, int n); extern const TInstant **temporal_instants(const Temporal *temp, int *count); @@ -1373,11 +1386,11 @@ extern TSequence *temporal_sequence_n(const Temporal *temp, int i); extern TSequence **temporal_sequences(const Temporal *temp, int *count); extern const TInstant *temporal_start_instant(const Temporal *temp); extern TSequence *temporal_start_sequence(const Temporal *temp); -extern TimestampTz temporal_start_timestamp(const Temporal *temp); +extern TimestampTz temporal_start_timestamptz(const Temporal *temp); extern TSequenceSet *temporal_stops(const Temporal *temp, double maxdist, const Interval *minduration); extern char *temporal_subtype(const Temporal *temp); extern SpanSet *temporal_time(const Temporal *temp); -extern bool temporal_timestamp_n(const Temporal *temp, int n, TimestampTz *result); +extern bool temporal_timestamptz_n(const Temporal *temp, int n, TimestampTz *result); extern TimestampTz *temporal_timestamps(const Temporal *temp, int *count); extern double tfloat_end_value(const Temporal *temp); extern double tfloat_max_value(const Temporal *temp); @@ -1403,9 +1416,9 @@ extern Temporal *temporal_scale_time(const Temporal *temp, const Interval *durat extern Temporal *temporal_set_interp(const Temporal *temp, interpType interp); extern Temporal *temporal_shift_scale_time(const Temporal *temp, const Interval *shift, const Interval *duration); extern Temporal *temporal_shift_time(const Temporal *temp, const Interval *shift); -extern Temporal *temporal_to_tinstant(const Temporal *temp); -extern Temporal *temporal_to_tsequence(const Temporal *temp, interpType interp); -extern Temporal *temporal_to_tsequenceset(const Temporal *temp, interpType interp); +extern TInstant *temporal_to_tinstant(const Temporal *temp); +extern TSequence *temporal_to_tsequence(const Temporal *temp, interpType interp); +extern TSequenceSet *temporal_to_tsequenceset(const Temporal *temp, interpType interp); extern Temporal *tfloat_scale_value(const Temporal *temp, double width); extern Temporal *tfloat_shift_scale_value(const Temporal *temp, double shift, double width); extern Temporal *tfloat_shift_value(const Temporal *temp, double shift); @@ -1546,6 +1559,155 @@ extern Temporal *tne_tpoint_point(const Temporal *temp, const GSERIALIZED *gs); extern Temporal *tne_tint_int(const Temporal *temp, int i); extern Temporal *tne_ttext_text(const Temporal *temp, const text *txt); +extern bool adjacent_numspan_tnumber(const Span *s, const Temporal *temp); +extern bool adjacent_stbox_tpoint(const STBox *box, const Temporal *temp); +extern bool adjacent_tbox_tnumber(const TBox *box, const Temporal *temp); +extern bool adjacent_temporal_temporal(const Temporal *temp1, const Temporal *temp2); +extern bool adjacent_temporal_tstzspan(const Temporal *temp, const Span *s); +extern bool adjacent_tnumber_numspan(const Temporal *temp, const Span *s); +extern bool adjacent_tnumber_tbox(const Temporal *temp, const TBox *box); +extern bool adjacent_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2); +extern bool adjacent_tpoint_stbox(const Temporal *temp, const STBox *box); +extern bool adjacent_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); +extern bool adjacent_tstzspan_temporal(const Span *s, const Temporal *temp); +extern bool contained_numspan_tnumber(const Span *s, const Temporal *temp); +extern bool contained_stbox_tpoint(const STBox *box, const Temporal *temp); +extern bool contained_tbox_tnumber(const TBox *box, const Temporal *temp); +extern bool contained_temporal_temporal(const Temporal *temp1, const Temporal *temp2); +extern bool contained_temporal_tstzspan(const Temporal *temp, const Span *s); +extern bool contained_tnumber_numspan(const Temporal *temp, const Span *s); +extern bool contained_tnumber_tbox(const Temporal *temp, const TBox *box); +extern bool contained_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2); +extern bool contained_tpoint_stbox(const Temporal *temp, const STBox *box); +extern bool contained_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); +extern bool contained_tstzspan_temporal(const Span *s, const Temporal *temp); +extern bool contains_numspan_tnumber(const Span *s, const Temporal *temp); +extern bool contains_stbox_tpoint(const STBox *box, const Temporal *temp); +extern bool contains_tbox_tnumber(const TBox *box, const Temporal *temp); +extern bool contains_temporal_tstzspan(const Temporal *temp, const Span *s); +extern bool contains_temporal_temporal(const Temporal *temp1, const Temporal *temp2); +extern bool contains_tnumber_numspan(const Temporal *temp, const Span *s); +extern bool contains_tnumber_tbox(const Temporal *temp, const TBox *box); +extern bool contains_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2); +extern bool contains_tpoint_stbox(const Temporal *temp, const STBox *box); +extern bool contains_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); +extern bool contains_tstzspan_temporal(const Span *s, const Temporal *temp); +extern bool overlaps_numspan_tnumber(const Span *s, const Temporal *temp); +extern bool overlaps_stbox_tpoint(const STBox *box, const Temporal *temp); +extern bool overlaps_tbox_tnumber(const TBox *box, const Temporal *temp); +extern bool overlaps_temporal_temporal(const Temporal *temp1, const Temporal *temp2); +extern bool overlaps_temporal_tstzspan(const Temporal *temp, const Span *s); +extern bool overlaps_tnumber_numspan(const Temporal *temp, const Span *s); +extern bool overlaps_tnumber_tbox(const Temporal *temp, const TBox *box); +extern bool overlaps_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2); +extern bool overlaps_tpoint_stbox(const Temporal *temp, const STBox *box); +extern bool overlaps_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); +extern bool overlaps_tstzspan_temporal(const Span *s, const Temporal *temp); +extern bool same_numspan_tnumber(const Span *s, const Temporal *temp); +extern bool same_stbox_tpoint(const STBox *box, const Temporal *temp); +extern bool same_tbox_tnumber(const TBox *box, const Temporal *temp); +extern bool same_temporal_temporal(const Temporal *temp1, const Temporal *temp2); +extern bool same_temporal_tstzspan(const Temporal *temp, const Span *s); +extern bool same_tnumber_numspan(const Temporal *temp, const Span *s); +extern bool same_tnumber_tbox(const Temporal *temp, const TBox *box); +extern bool same_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2); +extern bool same_tpoint_stbox(const Temporal *temp, const STBox *box); +extern bool same_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); +extern bool same_tstzspan_temporal(const Span *s, const Temporal *temp); + +extern bool above_stbox_tpoint(const STBox *box, const Temporal *temp); +extern bool above_tpoint_stbox(const Temporal *temp, const STBox *box); +extern bool above_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); +extern bool after_stbox_tpoint(const STBox *box, const Temporal *temp); +extern bool after_tbox_tnumber(const TBox *box, const Temporal *temp); +extern bool after_temporal_tstzspan(const Temporal *temp, const Span *s); +extern bool after_temporal_temporal(const Temporal *temp1, const Temporal *temp2); +extern bool after_tnumber_tbox(const Temporal *temp, const TBox *box); +extern bool after_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2); +extern bool after_tpoint_stbox(const Temporal *temp, const STBox *box); +extern bool after_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); +extern bool after_tstzspan_temporal(const Span *s, const Temporal *temp); +extern bool back_stbox_tpoint(const STBox *box, const Temporal *temp); +extern bool back_tpoint_stbox(const Temporal *temp, const STBox *box); +extern bool back_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); +extern bool before_stbox_tpoint(const STBox *box, const Temporal *temp); +extern bool before_tbox_tnumber(const TBox *box, const Temporal *temp); +extern bool before_temporal_tstzspan(const Temporal *temp, const Span *s); +extern bool before_temporal_temporal(const Temporal *temp1, const Temporal *temp2); +extern bool before_tnumber_tbox(const Temporal *temp, const TBox *box); +extern bool before_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2); +extern bool before_tpoint_stbox(const Temporal *temp, const STBox *box); +extern bool before_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); +extern bool before_tstzspan_temporal(const Span *s, const Temporal *temp); +extern bool below_stbox_tpoint(const STBox *box, const Temporal *temp); +extern bool below_tpoint_stbox(const Temporal *temp, const STBox *box); +extern bool below_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); +extern bool front_stbox_tpoint(const STBox *box, const Temporal *temp); +extern bool front_tpoint_stbox(const Temporal *temp, const STBox *box); +extern bool front_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); +extern bool left_stbox_tpoint(const STBox *box, const Temporal *temp); +extern bool left_tbox_tnumber(const TBox *box, const Temporal *temp); +extern bool left_numspan_tnumber(const Span *s, const Temporal *temp); +extern bool left_tnumber_numspan(const Temporal *temp, const Span *s); +extern bool left_tnumber_tbox(const Temporal *temp, const TBox *box); +extern bool left_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2); +extern bool left_tpoint_stbox(const Temporal *temp, const STBox *box); +extern bool left_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); +extern bool overabove_stbox_tpoint(const STBox *box, const Temporal *temp); +extern bool overabove_tpoint_stbox(const Temporal *temp, const STBox *box); +extern bool overabove_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); +extern bool overafter_stbox_tpoint(const STBox *box, const Temporal *temp); +extern bool overafter_tbox_tnumber(const TBox *box, const Temporal *temp); +extern bool overafter_temporal_tstzspan(const Temporal *temp, const Span *s); +extern bool overafter_temporal_temporal(const Temporal *temp1, const Temporal *temp2); +extern bool overafter_tnumber_tbox(const Temporal *temp, const TBox *box); +extern bool overafter_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2); +extern bool overafter_tpoint_stbox(const Temporal *temp, const STBox *box); +extern bool overafter_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); +extern bool overafter_tstzspan_temporal(const Span *s, const Temporal *temp); +extern bool overback_stbox_tpoint(const STBox *box, const Temporal *temp); +extern bool overback_tpoint_stbox(const Temporal *temp, const STBox *box); +extern bool overback_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); +extern bool overbefore_stbox_tpoint(const STBox *box, const Temporal *temp); +extern bool overbefore_tbox_tnumber(const TBox *box, const Temporal *temp); +extern bool overbefore_temporal_tstzspan(const Temporal *temp, const Span *s); +extern bool overbefore_temporal_temporal(const Temporal *temp1, const Temporal *temp2); +extern bool overbefore_tnumber_tbox(const Temporal *temp, const TBox *box); +extern bool overbefore_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2); +extern bool overbefore_tpoint_stbox(const Temporal *temp, const STBox *box); +extern bool overbefore_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); +extern bool overbefore_tstzspan_temporal(const Span *s, const Temporal *temp); +extern bool overbelow_stbox_tpoint(const STBox *box, const Temporal *temp); +extern bool overbelow_tpoint_stbox(const Temporal *temp, const STBox *box); +extern bool overbelow_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); +extern bool overfront_stbox_tpoint(const STBox *box, const Temporal *temp); +extern bool overfront_tpoint_stbox(const Temporal *temp, const STBox *box); +extern bool overfront_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); +extern bool overleft_numspan_tnumber(const Span *s, const Temporal *temp); +extern bool overleft_stbox_tpoint(const STBox *box, const Temporal *temp); +extern bool overleft_tbox_tnumber(const TBox *box, const Temporal *temp); +extern bool overleft_tnumber_numspan(const Temporal *temp, const Span *s); +extern bool overleft_tnumber_tbox(const Temporal *temp, const TBox *box); +extern bool overleft_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2); +extern bool overleft_tpoint_stbox(const Temporal *temp, const STBox *box); +extern bool overleft_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); +extern bool overright_numspan_tnumber(const Span *s, const Temporal *temp); +extern bool overright_stbox_tpoint(const STBox *box, const Temporal *temp); +extern bool overright_tbox_tnumber(const TBox *box, const Temporal *temp); +extern bool overright_tnumber_numspan(const Temporal *temp, const Span *s); +extern bool overright_tnumber_tbox(const Temporal *temp, const TBox *box); +extern bool overright_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2); +extern bool overright_tpoint_stbox(const Temporal *temp, const STBox *box); +extern bool overright_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); +extern bool right_numspan_tnumber(const Span *s, const Temporal *temp); +extern bool right_stbox_tpoint(const STBox *box, const Temporal *temp); +extern bool right_tbox_tnumber(const TBox *box, const Temporal *temp); +extern bool right_tnumber_numspan(const Temporal *temp, const Span *s); +extern bool right_tnumber_tbox(const Temporal *temp, const TBox *box); +extern bool right_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2); +extern bool right_tpoint_stbox(const Temporal *temp, const STBox *box); +extern bool right_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); + extern Temporal *tand_bool_tbool(bool b, const Temporal *temp); extern Temporal *tand_tbool_bool(const Temporal *temp, bool b); extern Temporal *tand_tbool_tbool(const Temporal *temp1, const Temporal *temp2); @@ -1631,7 +1793,7 @@ extern STBox *tpoint_stboxes(const Temporal *temp, int *count); extern GSERIALIZED *tpoint_trajectory(const Temporal *temp); extern STBox *geo_expand_space(const GSERIALIZED *gs, double d); -Temporal *geo_to_tpoint(const GSERIALIZED *gs); +extern Temporal *geomeas_to_tpoint(const GSERIALIZED *gs); extern Temporal *tgeogpoint_to_tgeompoint(const Temporal *temp); extern Temporal *tgeompoint_to_tgeogpoint(const Temporal *temp); bool tpoint_AsMVTGeom(const Temporal *temp, const STBox *bounds, int32_t extent, int32_t buffer, bool clip_geom, GSERIALIZED **gsarr, int64 **timesarr, int *count); @@ -1640,7 +1802,7 @@ extern Temporal **tpoint_make_simple(const Temporal *temp, int *count); extern Temporal *tpoint_round(const Temporal *temp, int maxdd); extern Temporal **tpointarr_round(const Temporal **temp, int count, int maxdd); extern Temporal *tpoint_set_srid(const Temporal *temp, int32 srid); -bool tpoint_to_geo_meas(const Temporal *tpoint, const Temporal *measure, bool segmentize, GSERIALIZED **result); +bool tpoint_tfloat_to_geomeas(const Temporal *tpoint, const Temporal *measure, bool segmentize, GSERIALIZED **result); extern int econtains_geo_tpoint(const GSERIALIZED *gs, const Temporal *temp); extern int edisjoint_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs); @@ -1700,6 +1862,7 @@ extern Span *floatspan_bucket_list(const Span *bounds, double size, double origi extern int int_bucket(int value, int size, int origin); extern Span *intspan_bucket_list(const Span *bounds, int size, int origin, int *count); extern Span *tstzspan_bucket_list(const Span *bounds, const Interval *duration, TimestampTz origin, int *count); +extern STBox *stbox_tile(GSERIALIZED *point, TimestampTz t, double xsize, double ysize, double zsize, Interval *duration, GSERIALIZED *sorigin, TimestampTz torigin, bool hast); extern STBox *stbox_tile_list(const STBox *bounds, double xsize, double ysize, double zsize, const Interval *duration, GSERIALIZED *sorigin, TimestampTz torigin, int *count); extern TBox *tintbox_tile_list(const TBox *box, int xsize, const Interval *duration, int xorigin, TimestampTz torigin, int *count); extern TBox *tfloatbox_tile_list(const TBox *box, double xsize, const Interval *duration, double xorigin, TimestampTz torigin, int *count); @@ -1719,6 +1882,8 @@ extern Temporal **tpoint_space_time_split(Temporal *temp, float xsize, float ysi typedef signed short int16; +//#include + typedef enum { T_UNKNOWN = 0, @@ -1847,8 +2012,16 @@ typedef struct meosType spantype; } spansettype_catalog_struct; -extern const char *meostype_name(meosType type); +/* extern bool temptype_subtype(tempSubtype subtype); (undefined) */ +/* extern bool temptype_subtype_all(tempSubtype subtype); (undefined) */ +extern const char *tempsubtype_name(tempSubtype subtype); +extern bool tempsubtype_from_string(const char *str, int16 *subtype); extern const char *meosoper_name(meosOper oper); +extern meosOper meosoper_from_string(const char *name); +extern const char *interptype_name(interpType interp); +extern interpType interptype_from_string(const char *interp_str); + +extern const char *meostype_name(meosType type); extern meosType temptype_basetype(meosType type); extern meosType settype_basetype(meosType type); extern meosType spantype_basetype(meosType type); @@ -1857,7 +2030,7 @@ extern meosType spansettype_spantype(meosType type); extern meosType basetype_spantype(meosType type); extern meosType basetype_settype(meosType type); -/* extern bool meostype_internal(meosType type); (undefined) */ +extern bool meostype_internal(meosType type); /* extern bool meos_basetype(meosType type); (undefined) */ /* extern bool alpha_basetype(meosType type); (undefined) */ extern bool tnumber_basetype(meosType type); @@ -1929,11 +2102,6 @@ extern bool ensure_tnumber_tgeo_type(meosType type); //#include //#include "meos_catalog.h" -#define ANYTEMPSUBTYPE 0 -#define TINSTANT 1 -#define TSEQUENCE 2 -#define TSEQUENCESET 3 - extern uint32 datum_hash(Datum d, meosType basetype); @@ -1974,7 +2142,9 @@ extern Span *set_span(const Set *s); extern Datum set_start_value(const Set *s); extern bool set_value_n(const Set *s, int n, Datum *result); extern Datum *set_values(const Set *s); +extern Datum spanset_lower(const SpanSet *ss); extern int spanset_mem_size(const SpanSet *ss); +extern Datum spanset_upper(const SpanSet *ss); extern void spatialset_set_stbox(const Set *set, STBox *box); extern void value_set_span(Datum d, meosType basetype, Span *s); @@ -2108,7 +2278,7 @@ extern void timestamptz_set_tbox(TimestampTz t, TBox *box); extern void tstzset_set_stbox(const Set *s, STBox *box); extern void tstzset_set_tbox(const Set *s, TBox *box); -extern TBox *tbox_shift_scale_value(const TBox *box, Datum shift, Datum width, bool hasshift, bool haswidth); +extern TBox *tbox_shift_scale_value(const TBox *box, Datum shift, Datum width, meosType basetype, bool hasshift, bool haswidth); extern void stbox_expand(const STBox *box1, STBox *box2); extern void tbox_expand(const TBox *box1, TBox *box2); @@ -2153,7 +2323,7 @@ extern TInstant *tgeompointinst_in(const char *str); extern TSequence *tgeompointseq_in(const char *str, interpType interp); /* extern TSequenceSet *tgeompointseqset_from_mfjson(json_object *mfjson, int srid, interpType interp); (undefined type json_object) */ extern TSequenceSet *tgeompointseqset_in(const char *str); -extern char *tinstant_as_mfjson(const TInstant *inst, int precision, bool with_bbox, char *srs); +extern char *tinstant_as_mfjson(const TInstant *inst, bool with_bbox, int precision, char *srs); /* extern TInstant *tinstant_from_mfjson(json_object *mfjson, bool isgeo, int srid, meosType temptype); (undefined type json_object) */ extern TInstant *tinstant_in(const char *str, meosType temptype); extern char *tinstant_out(const TInstant *inst, int maxdd); @@ -2170,11 +2340,11 @@ extern char **tpointarr_as_text(const Temporal **temparr, int count, int maxdd, extern char *tpointinst_as_mfjson(const TInstant *inst, bool with_bbox, int precision, char *srs); extern char *tpointseq_as_mfjson(const TSequence *seq, bool with_bbox, int precision, char *srs); extern char *tpointseqset_as_mfjson(const TSequenceSet *ss, bool with_bbox, int precision, char *srs); -extern char *tsequence_as_mfjson(const TSequence *seq, int precision, bool with_bbox, char *srs); +extern char *tsequence_as_mfjson(const TSequence *seq, bool with_bbox, int precision, char *srs); /* extern TSequence *tsequence_from_mfjson(json_object *mfjson, bool isgeo, int srid, meosType temptype, interpType interp); (undefined type json_object) */ extern TSequence *tsequence_in(const char *str, meosType temptype, interpType interp); extern char *tsequence_out(const TSequence *seq, int maxdd); -extern char *tsequenceset_as_mfjson(const TSequenceSet *ss, int precision, bool with_bbox, char *srs); +extern char *tsequenceset_as_mfjson(const TSequenceSet *ss, bool with_bbox, int precision, char *srs); /* extern TSequenceSet *tsequenceset_from_mfjson(json_object *mfjson, bool isgeo, int srid, meosType temptype, interpType interp); (undefined type json_object) */ extern TSequenceSet *tsequenceset_in(const char *str, meosType temptype, interpType interp); extern char *tsequenceset_out(const TSequenceSet *ss, int maxdd); @@ -2244,7 +2414,7 @@ extern bool tinstant_value_at_timestamptz(const TInstant *inst, TimestampTz t, D extern Datum tinstant_value_copy(const TInstant *inst); extern Datum *tinstant_values(const TInstant *inst, int *count); extern Interval *tsequence_duration(const TSequence *seq); -extern TimestampTz tsequence_end_timestamp(const TSequence *seq); +extern TimestampTz tsequence_end_timestamptz(const TSequence *seq); extern uint32 tsequence_hash(const TSequence *seq); extern const TInstant **tsequence_instants(const TSequence *seq); extern const TInstant *tsequence_max_instant(const TSequence *seq); @@ -2256,13 +2426,13 @@ extern TSequence **tsequence_sequences(const TSequence *seq, int *count); extern void tsequence_set_bbox(const TSequence *seq, void *box); extern void tsequence_expand_bbox(TSequence *seq, const TInstant *inst); extern void tsequenceset_expand_bbox(TSequenceSet *ss, const TSequence *seq); -extern TimestampTz tsequence_start_timestamp(const TSequence *seq); +extern TimestampTz tsequence_start_timestamptz(const TSequence *seq); extern SpanSet *tsequence_time(const TSequence *seq); extern TimestampTz *tsequence_timestamps(const TSequence *seq, int *count); extern bool tsequence_value_at_timestamptz(const TSequence *seq, TimestampTz t, bool strict, Datum *result); extern Datum *tsequence_values(const TSequence *seq, int *count); extern Interval *tsequenceset_duration(const TSequenceSet *ss, bool boundspan); -extern TimestampTz tsequenceset_end_timestamp(const TSequenceSet *ss); +extern TimestampTz tsequenceset_end_timestamptz(const TSequenceSet *ss); extern uint32 tsequenceset_hash(const TSequenceSet *ss); extern const TInstant *tsequenceset_inst_n(const TSequenceSet *ss, int n); extern const TInstant **tsequenceset_instants(const TSequenceSet *ss); @@ -2276,10 +2446,10 @@ extern TSequence **tsequenceset_segments(const TSequenceSet *ss, int *count); extern TSequence **tsequenceset_sequences(const TSequenceSet *ss); extern const TSequence **tsequenceset_sequences_p(const TSequenceSet *ss); extern void tsequenceset_set_bbox(const TSequenceSet *ss, void *box); -extern TimestampTz tsequenceset_start_timestamp(const TSequenceSet *ss); +extern TimestampTz tsequenceset_start_timestamptz(const TSequenceSet *ss); extern SpanSet *tsequenceset_time(const TSequenceSet *ss); /* extern Interval *tsequenceset_timespan(const TSequenceSet *ss); (undefined) */ -extern bool tsequenceset_timestamp_n(const TSequenceSet *ss, int n, TimestampTz *result); +extern bool tsequenceset_timestamptz_n(const TSequenceSet *ss, int n, TimestampTz *result); extern TimestampTz *tsequenceset_timestamps(const TSequenceSet *ss, int *count); extern bool tsequenceset_value_at_timestamptz(const TSequenceSet *ss, TimestampTz t, bool strict, Datum *result); extern Datum *tsequenceset_values(const TSequenceSet *ss, int *count); @@ -2353,14 +2523,14 @@ extern Temporal *tsequence_restrict_tstzspanset(const TSequence *seq, const Span /* extern TInstant *tsequence_restrict_timestamptz(const TSequence *seq, TimestampTz t, bool atfunc); (undefined) */ /* extern TSequence *tsequence_restrict_tstzset(const TSequence *seq, const Set *s, bool atfunc); (undefined) */ /* extern TSequenceSet *tsequence_restrict_value(const TSequence *seq, Datum value, bool atfunc); (undefined) */ -/* extern TSequenceSet *tsequence_restrict_values(const TSequence *seq, const Set *set, bool atfunc); (undefined) */ +/* extern TSequenceSet *tsequence_restrict_values(const TSequence *seq, const Set *s, bool atfunc); (undefined) */ extern TSequenceSet *tsequenceset_restrict_minmax(const TSequenceSet *ss, bool min, bool atfunc); extern TSequenceSet *tsequenceset_restrict_tstzspan(const TSequenceSet *ss, const Span *s, bool atfunc); extern TSequenceSet *tsequenceset_restrict_tstzspanset(const TSequenceSet *ss, const SpanSet *ps, bool atfunc); extern Temporal *tsequenceset_restrict_timestamptz(const TSequenceSet *ss, TimestampTz t, bool atfunc); extern Temporal *tsequenceset_restrict_tstzset(const TSequenceSet *ss, const Set *s, bool atfunc); extern TSequenceSet *tsequenceset_restrict_value(const TSequenceSet *ss, Datum value, bool atfunc); -extern TSequenceSet *tsequenceset_restrict_values(const TSequenceSet *ss, const Set *set, bool atfunc); +extern TSequenceSet *tsequenceset_restrict_values(const TSequenceSet *ss, const Set *s, bool atfunc); /* extern TSequence *tnumberseq_derivative(const TSequence *seq); (undefined) */ /* extern TSequenceSet *tnumberseqset_derivative(const TSequenceSet *ss); (undefined) */ @@ -2457,6 +2627,28 @@ extern Temporal *temporal_compact(const Temporal *temp); /* extern TSequence *tsequence_compact(const TSequence *seq); (repeated) */ /* extern TSequenceSet *tsequenceset_compact(const TSequenceSet *ss); (repeated) */ +/* extern SkipList *tbool_tand_transfn(SkipList *state, const Temporal *temp); (repeated) */ +/* extern SkipList *tbool_tor_transfn(SkipList *state, const Temporal *temp); (repeated) */ +/* extern Temporal *temporal_tagg_finalfn(SkipList *state); (repeated) */ +/* extern SkipList *temporal_tcount_transfn(SkipList *state, const Temporal *temp); (repeated) */ +/* extern SkipList *tfloat_tmax_transfn(SkipList *state, const Temporal *temp); (repeated) */ +/* extern SkipList *tfloat_tmin_transfn(SkipList *state, const Temporal *temp); (repeated) */ +/* extern SkipList *tfloat_tsum_transfn(SkipList *state, const Temporal *temp); (repeated) */ +extern SkipList *tfloat_wmax_transfn(SkipList *state, const Temporal *temp, const Interval *interval); +extern SkipList *tfloat_wmin_transfn(SkipList *state, const Temporal *temp, const Interval *interval); +extern SkipList *tfloat_wsum_transfn(SkipList *state, const Temporal *temp, const Interval *interval); +/* extern SkipList *tint_tmin_transfn(SkipList *state, const Temporal *temp); (repeated) */ +/* extern SkipList *tint_tmax_transfn(SkipList *state, const Temporal *temp); (repeated) */ +/* extern SkipList *tint_tsum_transfn(SkipList *state, const Temporal *temp); (repeated) */ +extern SkipList *tint_wmax_transfn(SkipList *state, const Temporal *temp, const Interval *interval); +extern SkipList *tint_wmin_transfn(SkipList *state, const Temporal *temp, const Interval *interval); +extern SkipList *tint_wsum_transfn(SkipList *state, const Temporal *temp, const Interval *interval); +/* extern Temporal *tnumber_tavg_finalfn(SkipList *state); (repeated) */ +/* extern SkipList *tnumber_tavg_transfn(SkipList *state, const Temporal *temp); (repeated) */ +extern SkipList *tnumber_wavg_transfn(SkipList *state, const Temporal *temp, const Interval *interval); +/* extern SkipList *ttext_tmin_transfn(SkipList *state, const Temporal *temp); (repeated) */ +/* extern SkipList *ttext_tmax_transfn(SkipList *state, const Temporal *temp); (repeated) */ + extern Temporal **tnumber_value_split(const Temporal *temp, Datum size, Datum origin, Datum **buckets, int *count); diff --git a/pymeos_cffi/pymeos_cffi/functions.py b/pymeos_cffi/pymeos_cffi/functions.py index 5b8f712c..5b4f834e 100644 --- a/pymeos_cffi/pymeos_cffi/functions.py +++ b/pymeos_cffi/pymeos_cffi/functions.py @@ -517,10 +517,10 @@ def pg_to_date(date_txt: str, fmt: str) -> "DateADT": return result if result != _ffi.NULL else None -def pg_to_timestamp(date_txt: str, fmt: str) -> "TimestampTz": +def pg_to_timestamptz(date_txt: str, fmt: str) -> "TimestampTz": date_txt_converted = cstring2text(date_txt) fmt_converted = cstring2text(fmt) - result = _lib.pg_to_timestamp(date_txt_converted, fmt_converted) + result = _lib.pg_to_timestamptz(date_txt_converted, fmt_converted) _check_error() return result if result != _ffi.NULL else None @@ -1668,7 +1668,7 @@ def span_width(s: "const Span *") -> "double": return result if result != _ffi.NULL else None -def spanset_end_span(ss: "const SpanSet *") -> "Span *": +def spanset_end_span(ss: "const SpanSet *") -> "const Span *": ss_converted = _ffi.cast("const SpanSet *", ss) result = _lib.spanset_end_span(ss_converted) _check_error() @@ -1711,7 +1711,7 @@ def spanset_span(ss: "const SpanSet *") -> "Span *": return result if result != _ffi.NULL else None -def spanset_span_n(ss: "const SpanSet *", i: int) -> "Span *": +def spanset_span_n(ss: "const SpanSet *", i: int) -> "const Span *": ss_converted = _ffi.cast("const SpanSet *", ss) result = _lib.spanset_span_n(ss_converted, i) _check_error() @@ -1725,7 +1725,7 @@ def spanset_spans(ss: "const SpanSet *") -> "const Span **": return result if result != _ffi.NULL else None -def spanset_start_span(ss: "const SpanSet *") -> "Span *": +def spanset_start_span(ss: "const SpanSet *") -> "const Span *": ss_converted = _ffi.cast("const SpanSet *", ss) result = _lib.spanset_start_span(ss_converted) _check_error() @@ -1845,9 +1845,9 @@ def tstzspanset_duration(ss: "const SpanSet *", boundspan: bool) -> "Interval *" return result if result != _ffi.NULL else None -def tstzspanset_end_timestamp(ss: "const SpanSet *") -> "TimestampTz": +def tstzspanset_end_timestamptz(ss: "const SpanSet *") -> "TimestampTz": ss_converted = _ffi.cast("const SpanSet *", ss) - result = _lib.tstzspanset_end_timestamp(ss_converted) + result = _lib.tstzspanset_end_timestamptz(ss_converted) _check_error() return result if result != _ffi.NULL else None @@ -1866,17 +1866,17 @@ def tstzspanset_num_timestamps(ss: "const SpanSet *") -> "int": return result if result != _ffi.NULL else None -def tstzspanset_start_timestamp(ss: "const SpanSet *") -> "TimestampTz": +def tstzspanset_start_timestamptz(ss: "const SpanSet *") -> "TimestampTz": ss_converted = _ffi.cast("const SpanSet *", ss) - result = _lib.tstzspanset_start_timestamp(ss_converted) + result = _lib.tstzspanset_start_timestamptz(ss_converted) _check_error() return result if result != _ffi.NULL else None -def tstzspanset_timestamp_n(ss: "const SpanSet *", n: int) -> int: +def tstzspanset_timestamptz_n(ss: "const SpanSet *", n: int) -> int: ss_converted = _ffi.cast("const SpanSet *", ss) out_result = _ffi.new("TimestampTz *") - result = _lib.tstzspanset_timestamp_n(ss_converted, n, out_result) + result = _lib.tstzspanset_timestamptz_n(ss_converted, n, out_result) _check_error() if result: return out_result[0] if out_result[0] != _ffi.NULL else None @@ -5475,6 +5475,46 @@ def tbox_xmin_inc(box: "const TBox *") -> "bool": return None +def tboxfloat_xmax(box: "const TBox *") -> "double": + box_converted = _ffi.cast("const TBox *", box) + out_result = _ffi.new("double *") + result = _lib.tboxfloat_xmax(box_converted, out_result) + _check_error() + if result: + return out_result[0] if out_result[0] != _ffi.NULL else None + return None + + +def tboxfloat_xmin(box: "const TBox *") -> "double": + box_converted = _ffi.cast("const TBox *", box) + out_result = _ffi.new("double *") + result = _lib.tboxfloat_xmin(box_converted, out_result) + _check_error() + if result: + return out_result[0] if out_result[0] != _ffi.NULL else None + return None + + +def tboxint_xmax(box: "const TBox *") -> "int": + box_converted = _ffi.cast("const TBox *", box) + out_result = _ffi.new("int *") + result = _lib.tboxint_xmax(box_converted, out_result) + _check_error() + if result: + return out_result[0] if out_result[0] != _ffi.NULL else None + return None + + +def tboxint_xmin(box: "const TBox *") -> "int": + box_converted = _ffi.cast("const TBox *", box) + out_result = _ffi.new("int *") + result = _lib.tboxint_xmin(box_converted, out_result) + _check_error() + if result: + return out_result[0] if out_result[0] != _ffi.NULL else None + return None + + def stbox_expand_space(box: "const STBox *", d: float) -> "STBox *": box_converted = _ffi.cast("const STBox *", box) result = _lib.stbox_expand_space(box_converted, d) @@ -6547,9 +6587,9 @@ def temporal_end_sequence(temp: "const Temporal *") -> "TSequence *": return result if result != _ffi.NULL else None -def temporal_end_timestamp(temp: "const Temporal *") -> "TimestampTz": +def temporal_end_timestamptz(temp: "const Temporal *") -> "TimestampTz": temp_converted = _ffi.cast("const Temporal *", temp) - result = _lib.temporal_end_timestamp(temp_converted) + result = _lib.temporal_end_timestamptz(temp_converted) _check_error() return result if result != _ffi.NULL else None @@ -6656,9 +6696,9 @@ def temporal_start_sequence(temp: "const Temporal *") -> "TSequence *": return result if result != _ffi.NULL else None -def temporal_start_timestamp(temp: "const Temporal *") -> "TimestampTz": +def temporal_start_timestamptz(temp: "const Temporal *") -> "TimestampTz": temp_converted = _ffi.cast("const Temporal *", temp) - result = _lib.temporal_start_timestamp(temp_converted) + result = _lib.temporal_start_timestamptz(temp_converted) _check_error() return result if result != _ffi.NULL else None @@ -6688,10 +6728,10 @@ def temporal_time(temp: "const Temporal *") -> "SpanSet *": return result if result != _ffi.NULL else None -def temporal_timestamp_n(temp: "const Temporal *", n: int) -> int: +def temporal_timestamptz_n(temp: "const Temporal *", n: int) -> int: temp_converted = _ffi.cast("const Temporal *", temp) out_result = _ffi.new("TimestampTz *") - result = _lib.temporal_timestamp_n(temp_converted, n, out_result) + result = _lib.temporal_timestamptz_n(temp_converted, n, out_result) _check_error() if result: return out_result[0] if out_result[0] != _ffi.NULL else None @@ -6894,7 +6934,7 @@ def temporal_shift_time( return result if result != _ffi.NULL else None -def temporal_to_tinstant(temp: "const Temporal *") -> "Temporal *": +def temporal_to_tinstant(temp: "const Temporal *") -> "TInstant *": temp_converted = _ffi.cast("const Temporal *", temp) result = _lib.temporal_to_tinstant(temp_converted) _check_error() @@ -6903,7 +6943,7 @@ def temporal_to_tinstant(temp: "const Temporal *") -> "Temporal *": def temporal_to_tsequence( temp: "const Temporal *", interp: "interpType" -) -> "Temporal *": +) -> "TSequence *": temp_converted = _ffi.cast("const Temporal *", temp) interp_converted = _ffi.cast("interpType", interp) result = _lib.temporal_to_tsequence(temp_converted, interp_converted) @@ -6913,7 +6953,7 @@ def temporal_to_tsequence( def temporal_to_tsequenceset( temp: "const Temporal *", interp: "interpType" -) -> "Temporal *": +) -> "TSequenceSet *": temp_converted = _ffi.cast("const Temporal *", temp) interp_converted = _ffi.cast("interpType", interp) result = _lib.temporal_to_tsequenceset(temp_converted, interp_converted) @@ -8050,320 +8090,1566 @@ def tne_ttext_text(temp: "const Temporal *", txt: str) -> "Temporal *": return result if result != _ffi.NULL else None -def tand_bool_tbool(b: bool, temp: "const Temporal *") -> "Temporal *": +def adjacent_numspan_tnumber(s: "const Span *", temp: "const Temporal *") -> "bool": + s_converted = _ffi.cast("const Span *", s) temp_converted = _ffi.cast("const Temporal *", temp) - result = _lib.tand_bool_tbool(b, temp_converted) + result = _lib.adjacent_numspan_tnumber(s_converted, temp_converted) _check_error() return result if result != _ffi.NULL else None -def tand_tbool_bool(temp: "const Temporal *", b: bool) -> "Temporal *": +def adjacent_stbox_tpoint(box: "const STBox *", temp: "const Temporal *") -> "bool": + box_converted = _ffi.cast("const STBox *", box) temp_converted = _ffi.cast("const Temporal *", temp) - result = _lib.tand_tbool_bool(temp_converted, b) + result = _lib.adjacent_stbox_tpoint(box_converted, temp_converted) _check_error() return result if result != _ffi.NULL else None -def tand_tbool_tbool( - temp1: "const Temporal *", temp2: "const Temporal *" -) -> "Temporal *": - temp1_converted = _ffi.cast("const Temporal *", temp1) - temp2_converted = _ffi.cast("const Temporal *", temp2) - result = _lib.tand_tbool_tbool(temp1_converted, temp2_converted) +def adjacent_tbox_tnumber(box: "const TBox *", temp: "const Temporal *") -> "bool": + box_converted = _ffi.cast("const TBox *", box) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.adjacent_tbox_tnumber(box_converted, temp_converted) _check_error() return result if result != _ffi.NULL else None -def tbool_when_true(temp: "const Temporal *") -> "SpanSet *": - temp_converted = _ffi.cast("const Temporal *", temp) - result = _lib.tbool_when_true(temp_converted) +def adjacent_temporal_temporal( + temp1: "const Temporal *", temp2: "const Temporal *" +) -> "bool": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.adjacent_temporal_temporal(temp1_converted, temp2_converted) _check_error() return result if result != _ffi.NULL else None -def tnot_tbool(temp: "const Temporal *") -> "Temporal *": +def adjacent_temporal_tstzspan(temp: "const Temporal *", s: "const Span *") -> "bool": temp_converted = _ffi.cast("const Temporal *", temp) - result = _lib.tnot_tbool(temp_converted) + s_converted = _ffi.cast("const Span *", s) + result = _lib.adjacent_temporal_tstzspan(temp_converted, s_converted) _check_error() return result if result != _ffi.NULL else None -def tor_bool_tbool(b: bool, temp: "const Temporal *") -> "Temporal *": +def adjacent_tnumber_numspan(temp: "const Temporal *", s: "const Span *") -> "bool": temp_converted = _ffi.cast("const Temporal *", temp) - result = _lib.tor_bool_tbool(b, temp_converted) + s_converted = _ffi.cast("const Span *", s) + result = _lib.adjacent_tnumber_numspan(temp_converted, s_converted) _check_error() return result if result != _ffi.NULL else None -def tor_tbool_bool(temp: "const Temporal *", b: bool) -> "Temporal *": +def adjacent_tnumber_tbox(temp: "const Temporal *", box: "const TBox *") -> "bool": temp_converted = _ffi.cast("const Temporal *", temp) - result = _lib.tor_tbool_bool(temp_converted, b) + box_converted = _ffi.cast("const TBox *", box) + result = _lib.adjacent_tnumber_tbox(temp_converted, box_converted) _check_error() return result if result != _ffi.NULL else None -def tor_tbool_tbool( +def adjacent_tnumber_tnumber( temp1: "const Temporal *", temp2: "const Temporal *" -) -> "Temporal *": +) -> "bool": temp1_converted = _ffi.cast("const Temporal *", temp1) temp2_converted = _ffi.cast("const Temporal *", temp2) - result = _lib.tor_tbool_tbool(temp1_converted, temp2_converted) + result = _lib.adjacent_tnumber_tnumber(temp1_converted, temp2_converted) _check_error() return result if result != _ffi.NULL else None -def add_float_tfloat(d: float, tnumber: "const Temporal *") -> "Temporal *": - tnumber_converted = _ffi.cast("const Temporal *", tnumber) - result = _lib.add_float_tfloat(d, tnumber_converted) +def adjacent_tpoint_stbox(temp: "const Temporal *", box: "const STBox *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + box_converted = _ffi.cast("const STBox *", box) + result = _lib.adjacent_tpoint_stbox(temp_converted, box_converted) _check_error() return result if result != _ffi.NULL else None -def add_int_tint(i: int, tnumber: "const Temporal *") -> "Temporal *": - tnumber_converted = _ffi.cast("const Temporal *", tnumber) - result = _lib.add_int_tint(i, tnumber_converted) +def adjacent_tpoint_tpoint( + temp1: "const Temporal *", temp2: "const Temporal *" +) -> "bool": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.adjacent_tpoint_tpoint(temp1_converted, temp2_converted) _check_error() return result if result != _ffi.NULL else None -def add_tfloat_float(tnumber: "const Temporal *", d: float) -> "Temporal *": - tnumber_converted = _ffi.cast("const Temporal *", tnumber) - result = _lib.add_tfloat_float(tnumber_converted, d) +def adjacent_tstzspan_temporal(s: "const Span *", temp: "const Temporal *") -> "bool": + s_converted = _ffi.cast("const Span *", s) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.adjacent_tstzspan_temporal(s_converted, temp_converted) _check_error() return result if result != _ffi.NULL else None -def add_tint_int(tnumber: "const Temporal *", i: int) -> "Temporal *": - tnumber_converted = _ffi.cast("const Temporal *", tnumber) - result = _lib.add_tint_int(tnumber_converted, i) +def contained_numspan_tnumber(s: "const Span *", temp: "const Temporal *") -> "bool": + s_converted = _ffi.cast("const Span *", s) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.contained_numspan_tnumber(s_converted, temp_converted) _check_error() return result if result != _ffi.NULL else None -def add_tnumber_tnumber( - tnumber1: "const Temporal *", tnumber2: "const Temporal *" -) -> "Temporal *": - tnumber1_converted = _ffi.cast("const Temporal *", tnumber1) - tnumber2_converted = _ffi.cast("const Temporal *", tnumber2) - result = _lib.add_tnumber_tnumber(tnumber1_converted, tnumber2_converted) +def contained_stbox_tpoint(box: "const STBox *", temp: "const Temporal *") -> "bool": + box_converted = _ffi.cast("const STBox *", box) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.contained_stbox_tpoint(box_converted, temp_converted) _check_error() return result if result != _ffi.NULL else None -def div_float_tfloat(d: float, tnumber: "const Temporal *") -> "Temporal *": - tnumber_converted = _ffi.cast("const Temporal *", tnumber) - result = _lib.div_float_tfloat(d, tnumber_converted) +def contained_tbox_tnumber(box: "const TBox *", temp: "const Temporal *") -> "bool": + box_converted = _ffi.cast("const TBox *", box) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.contained_tbox_tnumber(box_converted, temp_converted) _check_error() return result if result != _ffi.NULL else None -def div_int_tint(i: int, tnumber: "const Temporal *") -> "Temporal *": - tnumber_converted = _ffi.cast("const Temporal *", tnumber) - result = _lib.div_int_tint(i, tnumber_converted) +def contained_temporal_temporal( + temp1: "const Temporal *", temp2: "const Temporal *" +) -> "bool": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.contained_temporal_temporal(temp1_converted, temp2_converted) _check_error() return result if result != _ffi.NULL else None -def div_tfloat_float(tnumber: "const Temporal *", d: float) -> "Temporal *": - tnumber_converted = _ffi.cast("const Temporal *", tnumber) - result = _lib.div_tfloat_float(tnumber_converted, d) +def contained_temporal_tstzspan(temp: "const Temporal *", s: "const Span *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + s_converted = _ffi.cast("const Span *", s) + result = _lib.contained_temporal_tstzspan(temp_converted, s_converted) _check_error() return result if result != _ffi.NULL else None -def div_tint_int(tnumber: "const Temporal *", i: int) -> "Temporal *": - tnumber_converted = _ffi.cast("const Temporal *", tnumber) - result = _lib.div_tint_int(tnumber_converted, i) +def contained_tnumber_numspan(temp: "const Temporal *", s: "const Span *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + s_converted = _ffi.cast("const Span *", s) + result = _lib.contained_tnumber_numspan(temp_converted, s_converted) _check_error() return result if result != _ffi.NULL else None -def div_tnumber_tnumber( - tnumber1: "const Temporal *", tnumber2: "const Temporal *" -) -> "Temporal *": - tnumber1_converted = _ffi.cast("const Temporal *", tnumber1) - tnumber2_converted = _ffi.cast("const Temporal *", tnumber2) - result = _lib.div_tnumber_tnumber(tnumber1_converted, tnumber2_converted) +def contained_tnumber_tbox(temp: "const Temporal *", box: "const TBox *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + box_converted = _ffi.cast("const TBox *", box) + result = _lib.contained_tnumber_tbox(temp_converted, box_converted) _check_error() return result if result != _ffi.NULL else None -def float_degrees(value: float, normalize: bool) -> "double": - result = _lib.float_degrees(value, normalize) +def contained_tnumber_tnumber( + temp1: "const Temporal *", temp2: "const Temporal *" +) -> "bool": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.contained_tnumber_tnumber(temp1_converted, temp2_converted) _check_error() return result if result != _ffi.NULL else None -def mult_float_tfloat(d: float, tnumber: "const Temporal *") -> "Temporal *": - tnumber_converted = _ffi.cast("const Temporal *", tnumber) - result = _lib.mult_float_tfloat(d, tnumber_converted) +def contained_tpoint_stbox(temp: "const Temporal *", box: "const STBox *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + box_converted = _ffi.cast("const STBox *", box) + result = _lib.contained_tpoint_stbox(temp_converted, box_converted) _check_error() return result if result != _ffi.NULL else None -def mult_int_tint(i: int, tnumber: "const Temporal *") -> "Temporal *": - tnumber_converted = _ffi.cast("const Temporal *", tnumber) - result = _lib.mult_int_tint(i, tnumber_converted) +def contained_tpoint_tpoint( + temp1: "const Temporal *", temp2: "const Temporal *" +) -> "bool": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.contained_tpoint_tpoint(temp1_converted, temp2_converted) _check_error() return result if result != _ffi.NULL else None -def mult_tfloat_float(tnumber: "const Temporal *", d: float) -> "Temporal *": - tnumber_converted = _ffi.cast("const Temporal *", tnumber) - result = _lib.mult_tfloat_float(tnumber_converted, d) +def contained_tstzspan_temporal(s: "const Span *", temp: "const Temporal *") -> "bool": + s_converted = _ffi.cast("const Span *", s) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.contained_tstzspan_temporal(s_converted, temp_converted) _check_error() return result if result != _ffi.NULL else None -def mult_tint_int(tnumber: "const Temporal *", i: int) -> "Temporal *": - tnumber_converted = _ffi.cast("const Temporal *", tnumber) - result = _lib.mult_tint_int(tnumber_converted, i) +def contains_numspan_tnumber(s: "const Span *", temp: "const Temporal *") -> "bool": + s_converted = _ffi.cast("const Span *", s) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.contains_numspan_tnumber(s_converted, temp_converted) _check_error() return result if result != _ffi.NULL else None -def mult_tnumber_tnumber( - tnumber1: "const Temporal *", tnumber2: "const Temporal *" -) -> "Temporal *": - tnumber1_converted = _ffi.cast("const Temporal *", tnumber1) - tnumber2_converted = _ffi.cast("const Temporal *", tnumber2) - result = _lib.mult_tnumber_tnumber(tnumber1_converted, tnumber2_converted) +def contains_stbox_tpoint(box: "const STBox *", temp: "const Temporal *") -> "bool": + box_converted = _ffi.cast("const STBox *", box) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.contains_stbox_tpoint(box_converted, temp_converted) _check_error() return result if result != _ffi.NULL else None -def sub_float_tfloat(d: float, tnumber: "const Temporal *") -> "Temporal *": - tnumber_converted = _ffi.cast("const Temporal *", tnumber) - result = _lib.sub_float_tfloat(d, tnumber_converted) +def contains_tbox_tnumber(box: "const TBox *", temp: "const Temporal *") -> "bool": + box_converted = _ffi.cast("const TBox *", box) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.contains_tbox_tnumber(box_converted, temp_converted) _check_error() return result if result != _ffi.NULL else None -def sub_int_tint(i: int, tnumber: "const Temporal *") -> "Temporal *": - tnumber_converted = _ffi.cast("const Temporal *", tnumber) - result = _lib.sub_int_tint(i, tnumber_converted) +def contains_temporal_tstzspan(temp: "const Temporal *", s: "const Span *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + s_converted = _ffi.cast("const Span *", s) + result = _lib.contains_temporal_tstzspan(temp_converted, s_converted) _check_error() return result if result != _ffi.NULL else None -def sub_tfloat_float(tnumber: "const Temporal *", d: float) -> "Temporal *": - tnumber_converted = _ffi.cast("const Temporal *", tnumber) - result = _lib.sub_tfloat_float(tnumber_converted, d) +def contains_temporal_temporal( + temp1: "const Temporal *", temp2: "const Temporal *" +) -> "bool": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.contains_temporal_temporal(temp1_converted, temp2_converted) _check_error() return result if result != _ffi.NULL else None -def sub_tint_int(tnumber: "const Temporal *", i: int) -> "Temporal *": - tnumber_converted = _ffi.cast("const Temporal *", tnumber) - result = _lib.sub_tint_int(tnumber_converted, i) +def contains_tnumber_numspan(temp: "const Temporal *", s: "const Span *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + s_converted = _ffi.cast("const Span *", s) + result = _lib.contains_tnumber_numspan(temp_converted, s_converted) _check_error() return result if result != _ffi.NULL else None -def sub_tnumber_tnumber( - tnumber1: "const Temporal *", tnumber2: "const Temporal *" -) -> "Temporal *": - tnumber1_converted = _ffi.cast("const Temporal *", tnumber1) - tnumber2_converted = _ffi.cast("const Temporal *", tnumber2) - result = _lib.sub_tnumber_tnumber(tnumber1_converted, tnumber2_converted) +def contains_tnumber_tbox(temp: "const Temporal *", box: "const TBox *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + box_converted = _ffi.cast("const TBox *", box) + result = _lib.contains_tnumber_tbox(temp_converted, box_converted) _check_error() return result if result != _ffi.NULL else None -def tfloat_round(temp: "const Temporal *", maxdd: int) -> "Temporal *": +def contains_tnumber_tnumber( + temp1: "const Temporal *", temp2: "const Temporal *" +) -> "bool": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.contains_tnumber_tnumber(temp1_converted, temp2_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def contains_tpoint_stbox(temp: "const Temporal *", box: "const STBox *") -> "bool": temp_converted = _ffi.cast("const Temporal *", temp) - result = _lib.tfloat_round(temp_converted, maxdd) + box_converted = _ffi.cast("const STBox *", box) + result = _lib.contains_tpoint_stbox(temp_converted, box_converted) _check_error() return result if result != _ffi.NULL else None -def tfloatarr_round(temp: "const Temporal **", count: int, maxdd: int) -> "Temporal **": - temp_converted = [_ffi.cast("const Temporal *", x) for x in temp] - result = _lib.tfloatarr_round(temp_converted, count, maxdd) +def contains_tpoint_tpoint( + temp1: "const Temporal *", temp2: "const Temporal *" +) -> "bool": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.contains_tpoint_tpoint(temp1_converted, temp2_converted) _check_error() return result if result != _ffi.NULL else None -def tfloat_degrees(temp: "const Temporal *", normalize: bool) -> "Temporal *": +def contains_tstzspan_temporal(s: "const Span *", temp: "const Temporal *") -> "bool": + s_converted = _ffi.cast("const Span *", s) temp_converted = _ffi.cast("const Temporal *", temp) - result = _lib.tfloat_degrees(temp_converted, normalize) + result = _lib.contains_tstzspan_temporal(s_converted, temp_converted) _check_error() return result if result != _ffi.NULL else None -def tfloat_derivative(temp: "const Temporal *") -> "Temporal *": +def overlaps_numspan_tnumber(s: "const Span *", temp: "const Temporal *") -> "bool": + s_converted = _ffi.cast("const Span *", s) temp_converted = _ffi.cast("const Temporal *", temp) - result = _lib.tfloat_derivative(temp_converted) + result = _lib.overlaps_numspan_tnumber(s_converted, temp_converted) _check_error() return result if result != _ffi.NULL else None -def tfloat_radians(temp: "const Temporal *") -> "Temporal *": +def overlaps_stbox_tpoint(box: "const STBox *", temp: "const Temporal *") -> "bool": + box_converted = _ffi.cast("const STBox *", box) temp_converted = _ffi.cast("const Temporal *", temp) - result = _lib.tfloat_radians(temp_converted) + result = _lib.overlaps_stbox_tpoint(box_converted, temp_converted) _check_error() return result if result != _ffi.NULL else None -def tnumber_abs(temp: "const Temporal *") -> "Temporal *": +def overlaps_tbox_tnumber(box: "const TBox *", temp: "const Temporal *") -> "bool": + box_converted = _ffi.cast("const TBox *", box) temp_converted = _ffi.cast("const Temporal *", temp) - result = _lib.tnumber_abs(temp_converted) + result = _lib.overlaps_tbox_tnumber(box_converted, temp_converted) _check_error() return result if result != _ffi.NULL else None -def tnumber_angular_difference(temp: "const Temporal *") -> "Temporal *": - temp_converted = _ffi.cast("const Temporal *", temp) - result = _lib.tnumber_angular_difference(temp_converted) +def overlaps_temporal_temporal( + temp1: "const Temporal *", temp2: "const Temporal *" +) -> "bool": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.overlaps_temporal_temporal(temp1_converted, temp2_converted) _check_error() return result if result != _ffi.NULL else None -def tnumber_delta_value(temp: "const Temporal *") -> "Temporal *": +def overlaps_temporal_tstzspan(temp: "const Temporal *", s: "const Span *") -> "bool": temp_converted = _ffi.cast("const Temporal *", temp) - result = _lib.tnumber_delta_value(temp_converted) + s_converted = _ffi.cast("const Span *", s) + result = _lib.overlaps_temporal_tstzspan(temp_converted, s_converted) _check_error() return result if result != _ffi.NULL else None -def textcat_text_ttext(txt: str, temp: "const Temporal *") -> "Temporal *": - txt_converted = cstring2text(txt) +def overlaps_tnumber_numspan(temp: "const Temporal *", s: "const Span *") -> "bool": temp_converted = _ffi.cast("const Temporal *", temp) - result = _lib.textcat_text_ttext(txt_converted, temp_converted) + s_converted = _ffi.cast("const Span *", s) + result = _lib.overlaps_tnumber_numspan(temp_converted, s_converted) _check_error() return result if result != _ffi.NULL else None -def textcat_ttext_text(temp: "const Temporal *", txt: str) -> "Temporal *": +def overlaps_tnumber_tbox(temp: "const Temporal *", box: "const TBox *") -> "bool": temp_converted = _ffi.cast("const Temporal *", temp) - txt_converted = cstring2text(txt) - result = _lib.textcat_ttext_text(temp_converted, txt_converted) + box_converted = _ffi.cast("const TBox *", box) + result = _lib.overlaps_tnumber_tbox(temp_converted, box_converted) _check_error() return result if result != _ffi.NULL else None -def textcat_ttext_ttext( +def overlaps_tnumber_tnumber( temp1: "const Temporal *", temp2: "const Temporal *" -) -> "Temporal *": +) -> "bool": temp1_converted = _ffi.cast("const Temporal *", temp1) temp2_converted = _ffi.cast("const Temporal *", temp2) - result = _lib.textcat_ttext_ttext(temp1_converted, temp2_converted) + result = _lib.overlaps_tnumber_tnumber(temp1_converted, temp2_converted) _check_error() return result if result != _ffi.NULL else None -def ttext_upper(temp: "const Temporal *") -> "Temporal *": +def overlaps_tpoint_stbox(temp: "const Temporal *", box: "const STBox *") -> "bool": temp_converted = _ffi.cast("const Temporal *", temp) - result = _lib.ttext_upper(temp_converted) + box_converted = _ffi.cast("const STBox *", box) + result = _lib.overlaps_tpoint_stbox(temp_converted, box_converted) _check_error() return result if result != _ffi.NULL else None -def ttext_lower(temp: "const Temporal *") -> "Temporal *": - temp_converted = _ffi.cast("const Temporal *", temp) - result = _lib.ttext_lower(temp_converted) - _check_error() - return result if result != _ffi.NULL else None +def overlaps_tpoint_tpoint( + temp1: "const Temporal *", temp2: "const Temporal *" +) -> "bool": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.overlaps_tpoint_tpoint(temp1_converted, temp2_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overlaps_tstzspan_temporal(s: "const Span *", temp: "const Temporal *") -> "bool": + s_converted = _ffi.cast("const Span *", s) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.overlaps_tstzspan_temporal(s_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def same_numspan_tnumber(s: "const Span *", temp: "const Temporal *") -> "bool": + s_converted = _ffi.cast("const Span *", s) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.same_numspan_tnumber(s_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def same_stbox_tpoint(box: "const STBox *", temp: "const Temporal *") -> "bool": + box_converted = _ffi.cast("const STBox *", box) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.same_stbox_tpoint(box_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def same_tbox_tnumber(box: "const TBox *", temp: "const Temporal *") -> "bool": + box_converted = _ffi.cast("const TBox *", box) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.same_tbox_tnumber(box_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def same_temporal_temporal( + temp1: "const Temporal *", temp2: "const Temporal *" +) -> "bool": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.same_temporal_temporal(temp1_converted, temp2_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def same_temporal_tstzspan(temp: "const Temporal *", s: "const Span *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + s_converted = _ffi.cast("const Span *", s) + result = _lib.same_temporal_tstzspan(temp_converted, s_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def same_tnumber_numspan(temp: "const Temporal *", s: "const Span *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + s_converted = _ffi.cast("const Span *", s) + result = _lib.same_tnumber_numspan(temp_converted, s_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def same_tnumber_tbox(temp: "const Temporal *", box: "const TBox *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + box_converted = _ffi.cast("const TBox *", box) + result = _lib.same_tnumber_tbox(temp_converted, box_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def same_tnumber_tnumber( + temp1: "const Temporal *", temp2: "const Temporal *" +) -> "bool": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.same_tnumber_tnumber(temp1_converted, temp2_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def same_tpoint_stbox(temp: "const Temporal *", box: "const STBox *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + box_converted = _ffi.cast("const STBox *", box) + result = _lib.same_tpoint_stbox(temp_converted, box_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def same_tpoint_tpoint(temp1: "const Temporal *", temp2: "const Temporal *") -> "bool": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.same_tpoint_tpoint(temp1_converted, temp2_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def same_tstzspan_temporal(s: "const Span *", temp: "const Temporal *") -> "bool": + s_converted = _ffi.cast("const Span *", s) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.same_tstzspan_temporal(s_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def above_stbox_tpoint(box: "const STBox *", temp: "const Temporal *") -> "bool": + box_converted = _ffi.cast("const STBox *", box) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.above_stbox_tpoint(box_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def above_tpoint_stbox(temp: "const Temporal *", box: "const STBox *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + box_converted = _ffi.cast("const STBox *", box) + result = _lib.above_tpoint_stbox(temp_converted, box_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def above_tpoint_tpoint(temp1: "const Temporal *", temp2: "const Temporal *") -> "bool": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.above_tpoint_tpoint(temp1_converted, temp2_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def after_stbox_tpoint(box: "const STBox *", temp: "const Temporal *") -> "bool": + box_converted = _ffi.cast("const STBox *", box) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.after_stbox_tpoint(box_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def after_tbox_tnumber(box: "const TBox *", temp: "const Temporal *") -> "bool": + box_converted = _ffi.cast("const TBox *", box) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.after_tbox_tnumber(box_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def after_temporal_tstzspan(temp: "const Temporal *", s: "const Span *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + s_converted = _ffi.cast("const Span *", s) + result = _lib.after_temporal_tstzspan(temp_converted, s_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def after_temporal_temporal( + temp1: "const Temporal *", temp2: "const Temporal *" +) -> "bool": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.after_temporal_temporal(temp1_converted, temp2_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def after_tnumber_tbox(temp: "const Temporal *", box: "const TBox *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + box_converted = _ffi.cast("const TBox *", box) + result = _lib.after_tnumber_tbox(temp_converted, box_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def after_tnumber_tnumber( + temp1: "const Temporal *", temp2: "const Temporal *" +) -> "bool": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.after_tnumber_tnumber(temp1_converted, temp2_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def after_tpoint_stbox(temp: "const Temporal *", box: "const STBox *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + box_converted = _ffi.cast("const STBox *", box) + result = _lib.after_tpoint_stbox(temp_converted, box_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def after_tpoint_tpoint(temp1: "const Temporal *", temp2: "const Temporal *") -> "bool": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.after_tpoint_tpoint(temp1_converted, temp2_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def after_tstzspan_temporal(s: "const Span *", temp: "const Temporal *") -> "bool": + s_converted = _ffi.cast("const Span *", s) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.after_tstzspan_temporal(s_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def back_stbox_tpoint(box: "const STBox *", temp: "const Temporal *") -> "bool": + box_converted = _ffi.cast("const STBox *", box) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.back_stbox_tpoint(box_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def back_tpoint_stbox(temp: "const Temporal *", box: "const STBox *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + box_converted = _ffi.cast("const STBox *", box) + result = _lib.back_tpoint_stbox(temp_converted, box_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def back_tpoint_tpoint(temp1: "const Temporal *", temp2: "const Temporal *") -> "bool": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.back_tpoint_tpoint(temp1_converted, temp2_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def before_stbox_tpoint(box: "const STBox *", temp: "const Temporal *") -> "bool": + box_converted = _ffi.cast("const STBox *", box) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.before_stbox_tpoint(box_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def before_tbox_tnumber(box: "const TBox *", temp: "const Temporal *") -> "bool": + box_converted = _ffi.cast("const TBox *", box) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.before_tbox_tnumber(box_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def before_temporal_tstzspan(temp: "const Temporal *", s: "const Span *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + s_converted = _ffi.cast("const Span *", s) + result = _lib.before_temporal_tstzspan(temp_converted, s_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def before_temporal_temporal( + temp1: "const Temporal *", temp2: "const Temporal *" +) -> "bool": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.before_temporal_temporal(temp1_converted, temp2_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def before_tnumber_tbox(temp: "const Temporal *", box: "const TBox *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + box_converted = _ffi.cast("const TBox *", box) + result = _lib.before_tnumber_tbox(temp_converted, box_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def before_tnumber_tnumber( + temp1: "const Temporal *", temp2: "const Temporal *" +) -> "bool": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.before_tnumber_tnumber(temp1_converted, temp2_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def before_tpoint_stbox(temp: "const Temporal *", box: "const STBox *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + box_converted = _ffi.cast("const STBox *", box) + result = _lib.before_tpoint_stbox(temp_converted, box_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def before_tpoint_tpoint( + temp1: "const Temporal *", temp2: "const Temporal *" +) -> "bool": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.before_tpoint_tpoint(temp1_converted, temp2_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def before_tstzspan_temporal(s: "const Span *", temp: "const Temporal *") -> "bool": + s_converted = _ffi.cast("const Span *", s) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.before_tstzspan_temporal(s_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def below_stbox_tpoint(box: "const STBox *", temp: "const Temporal *") -> "bool": + box_converted = _ffi.cast("const STBox *", box) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.below_stbox_tpoint(box_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def below_tpoint_stbox(temp: "const Temporal *", box: "const STBox *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + box_converted = _ffi.cast("const STBox *", box) + result = _lib.below_tpoint_stbox(temp_converted, box_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def below_tpoint_tpoint(temp1: "const Temporal *", temp2: "const Temporal *") -> "bool": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.below_tpoint_tpoint(temp1_converted, temp2_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def front_stbox_tpoint(box: "const STBox *", temp: "const Temporal *") -> "bool": + box_converted = _ffi.cast("const STBox *", box) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.front_stbox_tpoint(box_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def front_tpoint_stbox(temp: "const Temporal *", box: "const STBox *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + box_converted = _ffi.cast("const STBox *", box) + result = _lib.front_tpoint_stbox(temp_converted, box_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def front_tpoint_tpoint(temp1: "const Temporal *", temp2: "const Temporal *") -> "bool": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.front_tpoint_tpoint(temp1_converted, temp2_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def left_stbox_tpoint(box: "const STBox *", temp: "const Temporal *") -> "bool": + box_converted = _ffi.cast("const STBox *", box) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.left_stbox_tpoint(box_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def left_tbox_tnumber(box: "const TBox *", temp: "const Temporal *") -> "bool": + box_converted = _ffi.cast("const TBox *", box) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.left_tbox_tnumber(box_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def left_numspan_tnumber(s: "const Span *", temp: "const Temporal *") -> "bool": + s_converted = _ffi.cast("const Span *", s) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.left_numspan_tnumber(s_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def left_tnumber_numspan(temp: "const Temporal *", s: "const Span *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + s_converted = _ffi.cast("const Span *", s) + result = _lib.left_tnumber_numspan(temp_converted, s_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def left_tnumber_tbox(temp: "const Temporal *", box: "const TBox *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + box_converted = _ffi.cast("const TBox *", box) + result = _lib.left_tnumber_tbox(temp_converted, box_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def left_tnumber_tnumber( + temp1: "const Temporal *", temp2: "const Temporal *" +) -> "bool": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.left_tnumber_tnumber(temp1_converted, temp2_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def left_tpoint_stbox(temp: "const Temporal *", box: "const STBox *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + box_converted = _ffi.cast("const STBox *", box) + result = _lib.left_tpoint_stbox(temp_converted, box_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def left_tpoint_tpoint(temp1: "const Temporal *", temp2: "const Temporal *") -> "bool": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.left_tpoint_tpoint(temp1_converted, temp2_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overabove_stbox_tpoint(box: "const STBox *", temp: "const Temporal *") -> "bool": + box_converted = _ffi.cast("const STBox *", box) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.overabove_stbox_tpoint(box_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overabove_tpoint_stbox(temp: "const Temporal *", box: "const STBox *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + box_converted = _ffi.cast("const STBox *", box) + result = _lib.overabove_tpoint_stbox(temp_converted, box_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overabove_tpoint_tpoint( + temp1: "const Temporal *", temp2: "const Temporal *" +) -> "bool": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.overabove_tpoint_tpoint(temp1_converted, temp2_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overafter_stbox_tpoint(box: "const STBox *", temp: "const Temporal *") -> "bool": + box_converted = _ffi.cast("const STBox *", box) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.overafter_stbox_tpoint(box_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overafter_tbox_tnumber(box: "const TBox *", temp: "const Temporal *") -> "bool": + box_converted = _ffi.cast("const TBox *", box) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.overafter_tbox_tnumber(box_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overafter_temporal_tstzspan(temp: "const Temporal *", s: "const Span *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + s_converted = _ffi.cast("const Span *", s) + result = _lib.overafter_temporal_tstzspan(temp_converted, s_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overafter_temporal_temporal( + temp1: "const Temporal *", temp2: "const Temporal *" +) -> "bool": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.overafter_temporal_temporal(temp1_converted, temp2_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overafter_tnumber_tbox(temp: "const Temporal *", box: "const TBox *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + box_converted = _ffi.cast("const TBox *", box) + result = _lib.overafter_tnumber_tbox(temp_converted, box_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overafter_tnumber_tnumber( + temp1: "const Temporal *", temp2: "const Temporal *" +) -> "bool": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.overafter_tnumber_tnumber(temp1_converted, temp2_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overafter_tpoint_stbox(temp: "const Temporal *", box: "const STBox *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + box_converted = _ffi.cast("const STBox *", box) + result = _lib.overafter_tpoint_stbox(temp_converted, box_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overafter_tpoint_tpoint( + temp1: "const Temporal *", temp2: "const Temporal *" +) -> "bool": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.overafter_tpoint_tpoint(temp1_converted, temp2_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overafter_tstzspan_temporal(s: "const Span *", temp: "const Temporal *") -> "bool": + s_converted = _ffi.cast("const Span *", s) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.overafter_tstzspan_temporal(s_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overback_stbox_tpoint(box: "const STBox *", temp: "const Temporal *") -> "bool": + box_converted = _ffi.cast("const STBox *", box) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.overback_stbox_tpoint(box_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overback_tpoint_stbox(temp: "const Temporal *", box: "const STBox *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + box_converted = _ffi.cast("const STBox *", box) + result = _lib.overback_tpoint_stbox(temp_converted, box_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overback_tpoint_tpoint( + temp1: "const Temporal *", temp2: "const Temporal *" +) -> "bool": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.overback_tpoint_tpoint(temp1_converted, temp2_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overbefore_stbox_tpoint(box: "const STBox *", temp: "const Temporal *") -> "bool": + box_converted = _ffi.cast("const STBox *", box) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.overbefore_stbox_tpoint(box_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overbefore_tbox_tnumber(box: "const TBox *", temp: "const Temporal *") -> "bool": + box_converted = _ffi.cast("const TBox *", box) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.overbefore_tbox_tnumber(box_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overbefore_temporal_tstzspan(temp: "const Temporal *", s: "const Span *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + s_converted = _ffi.cast("const Span *", s) + result = _lib.overbefore_temporal_tstzspan(temp_converted, s_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overbefore_temporal_temporal( + temp1: "const Temporal *", temp2: "const Temporal *" +) -> "bool": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.overbefore_temporal_temporal(temp1_converted, temp2_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overbefore_tnumber_tbox(temp: "const Temporal *", box: "const TBox *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + box_converted = _ffi.cast("const TBox *", box) + result = _lib.overbefore_tnumber_tbox(temp_converted, box_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overbefore_tnumber_tnumber( + temp1: "const Temporal *", temp2: "const Temporal *" +) -> "bool": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.overbefore_tnumber_tnumber(temp1_converted, temp2_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overbefore_tpoint_stbox(temp: "const Temporal *", box: "const STBox *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + box_converted = _ffi.cast("const STBox *", box) + result = _lib.overbefore_tpoint_stbox(temp_converted, box_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overbefore_tpoint_tpoint( + temp1: "const Temporal *", temp2: "const Temporal *" +) -> "bool": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.overbefore_tpoint_tpoint(temp1_converted, temp2_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overbefore_tstzspan_temporal(s: "const Span *", temp: "const Temporal *") -> "bool": + s_converted = _ffi.cast("const Span *", s) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.overbefore_tstzspan_temporal(s_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overbelow_stbox_tpoint(box: "const STBox *", temp: "const Temporal *") -> "bool": + box_converted = _ffi.cast("const STBox *", box) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.overbelow_stbox_tpoint(box_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overbelow_tpoint_stbox(temp: "const Temporal *", box: "const STBox *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + box_converted = _ffi.cast("const STBox *", box) + result = _lib.overbelow_tpoint_stbox(temp_converted, box_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overbelow_tpoint_tpoint( + temp1: "const Temporal *", temp2: "const Temporal *" +) -> "bool": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.overbelow_tpoint_tpoint(temp1_converted, temp2_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overfront_stbox_tpoint(box: "const STBox *", temp: "const Temporal *") -> "bool": + box_converted = _ffi.cast("const STBox *", box) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.overfront_stbox_tpoint(box_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overfront_tpoint_stbox(temp: "const Temporal *", box: "const STBox *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + box_converted = _ffi.cast("const STBox *", box) + result = _lib.overfront_tpoint_stbox(temp_converted, box_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overfront_tpoint_tpoint( + temp1: "const Temporal *", temp2: "const Temporal *" +) -> "bool": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.overfront_tpoint_tpoint(temp1_converted, temp2_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overleft_numspan_tnumber(s: "const Span *", temp: "const Temporal *") -> "bool": + s_converted = _ffi.cast("const Span *", s) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.overleft_numspan_tnumber(s_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overleft_stbox_tpoint(box: "const STBox *", temp: "const Temporal *") -> "bool": + box_converted = _ffi.cast("const STBox *", box) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.overleft_stbox_tpoint(box_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overleft_tbox_tnumber(box: "const TBox *", temp: "const Temporal *") -> "bool": + box_converted = _ffi.cast("const TBox *", box) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.overleft_tbox_tnumber(box_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overleft_tnumber_numspan(temp: "const Temporal *", s: "const Span *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + s_converted = _ffi.cast("const Span *", s) + result = _lib.overleft_tnumber_numspan(temp_converted, s_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overleft_tnumber_tbox(temp: "const Temporal *", box: "const TBox *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + box_converted = _ffi.cast("const TBox *", box) + result = _lib.overleft_tnumber_tbox(temp_converted, box_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overleft_tnumber_tnumber( + temp1: "const Temporal *", temp2: "const Temporal *" +) -> "bool": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.overleft_tnumber_tnumber(temp1_converted, temp2_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overleft_tpoint_stbox(temp: "const Temporal *", box: "const STBox *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + box_converted = _ffi.cast("const STBox *", box) + result = _lib.overleft_tpoint_stbox(temp_converted, box_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overleft_tpoint_tpoint( + temp1: "const Temporal *", temp2: "const Temporal *" +) -> "bool": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.overleft_tpoint_tpoint(temp1_converted, temp2_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overright_numspan_tnumber(s: "const Span *", temp: "const Temporal *") -> "bool": + s_converted = _ffi.cast("const Span *", s) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.overright_numspan_tnumber(s_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overright_stbox_tpoint(box: "const STBox *", temp: "const Temporal *") -> "bool": + box_converted = _ffi.cast("const STBox *", box) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.overright_stbox_tpoint(box_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overright_tbox_tnumber(box: "const TBox *", temp: "const Temporal *") -> "bool": + box_converted = _ffi.cast("const TBox *", box) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.overright_tbox_tnumber(box_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overright_tnumber_numspan(temp: "const Temporal *", s: "const Span *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + s_converted = _ffi.cast("const Span *", s) + result = _lib.overright_tnumber_numspan(temp_converted, s_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overright_tnumber_tbox(temp: "const Temporal *", box: "const TBox *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + box_converted = _ffi.cast("const TBox *", box) + result = _lib.overright_tnumber_tbox(temp_converted, box_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overright_tnumber_tnumber( + temp1: "const Temporal *", temp2: "const Temporal *" +) -> "bool": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.overright_tnumber_tnumber(temp1_converted, temp2_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overright_tpoint_stbox(temp: "const Temporal *", box: "const STBox *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + box_converted = _ffi.cast("const STBox *", box) + result = _lib.overright_tpoint_stbox(temp_converted, box_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def overright_tpoint_tpoint( + temp1: "const Temporal *", temp2: "const Temporal *" +) -> "bool": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.overright_tpoint_tpoint(temp1_converted, temp2_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def right_numspan_tnumber(s: "const Span *", temp: "const Temporal *") -> "bool": + s_converted = _ffi.cast("const Span *", s) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.right_numspan_tnumber(s_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def right_stbox_tpoint(box: "const STBox *", temp: "const Temporal *") -> "bool": + box_converted = _ffi.cast("const STBox *", box) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.right_stbox_tpoint(box_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def right_tbox_tnumber(box: "const TBox *", temp: "const Temporal *") -> "bool": + box_converted = _ffi.cast("const TBox *", box) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.right_tbox_tnumber(box_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def right_tnumber_numspan(temp: "const Temporal *", s: "const Span *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + s_converted = _ffi.cast("const Span *", s) + result = _lib.right_tnumber_numspan(temp_converted, s_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def right_tnumber_tbox(temp: "const Temporal *", box: "const TBox *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + box_converted = _ffi.cast("const TBox *", box) + result = _lib.right_tnumber_tbox(temp_converted, box_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def right_tnumber_tnumber( + temp1: "const Temporal *", temp2: "const Temporal *" +) -> "bool": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.right_tnumber_tnumber(temp1_converted, temp2_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def right_tpoint_stbox(temp: "const Temporal *", box: "const STBox *") -> "bool": + temp_converted = _ffi.cast("const Temporal *", temp) + box_converted = _ffi.cast("const STBox *", box) + result = _lib.right_tpoint_stbox(temp_converted, box_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def right_tpoint_tpoint(temp1: "const Temporal *", temp2: "const Temporal *") -> "bool": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.right_tpoint_tpoint(temp1_converted, temp2_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def tand_bool_tbool(b: bool, temp: "const Temporal *") -> "Temporal *": + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.tand_bool_tbool(b, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def tand_tbool_bool(temp: "const Temporal *", b: bool) -> "Temporal *": + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.tand_tbool_bool(temp_converted, b) + _check_error() + return result if result != _ffi.NULL else None + + +def tand_tbool_tbool( + temp1: "const Temporal *", temp2: "const Temporal *" +) -> "Temporal *": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.tand_tbool_tbool(temp1_converted, temp2_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def tbool_when_true(temp: "const Temporal *") -> "SpanSet *": + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.tbool_when_true(temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def tnot_tbool(temp: "const Temporal *") -> "Temporal *": + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.tnot_tbool(temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def tor_bool_tbool(b: bool, temp: "const Temporal *") -> "Temporal *": + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.tor_bool_tbool(b, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def tor_tbool_bool(temp: "const Temporal *", b: bool) -> "Temporal *": + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.tor_tbool_bool(temp_converted, b) + _check_error() + return result if result != _ffi.NULL else None + + +def tor_tbool_tbool( + temp1: "const Temporal *", temp2: "const Temporal *" +) -> "Temporal *": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.tor_tbool_tbool(temp1_converted, temp2_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def add_float_tfloat(d: float, tnumber: "const Temporal *") -> "Temporal *": + tnumber_converted = _ffi.cast("const Temporal *", tnumber) + result = _lib.add_float_tfloat(d, tnumber_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def add_int_tint(i: int, tnumber: "const Temporal *") -> "Temporal *": + tnumber_converted = _ffi.cast("const Temporal *", tnumber) + result = _lib.add_int_tint(i, tnumber_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def add_tfloat_float(tnumber: "const Temporal *", d: float) -> "Temporal *": + tnumber_converted = _ffi.cast("const Temporal *", tnumber) + result = _lib.add_tfloat_float(tnumber_converted, d) + _check_error() + return result if result != _ffi.NULL else None + + +def add_tint_int(tnumber: "const Temporal *", i: int) -> "Temporal *": + tnumber_converted = _ffi.cast("const Temporal *", tnumber) + result = _lib.add_tint_int(tnumber_converted, i) + _check_error() + return result if result != _ffi.NULL else None + + +def add_tnumber_tnumber( + tnumber1: "const Temporal *", tnumber2: "const Temporal *" +) -> "Temporal *": + tnumber1_converted = _ffi.cast("const Temporal *", tnumber1) + tnumber2_converted = _ffi.cast("const Temporal *", tnumber2) + result = _lib.add_tnumber_tnumber(tnumber1_converted, tnumber2_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def div_float_tfloat(d: float, tnumber: "const Temporal *") -> "Temporal *": + tnumber_converted = _ffi.cast("const Temporal *", tnumber) + result = _lib.div_float_tfloat(d, tnumber_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def div_int_tint(i: int, tnumber: "const Temporal *") -> "Temporal *": + tnumber_converted = _ffi.cast("const Temporal *", tnumber) + result = _lib.div_int_tint(i, tnumber_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def div_tfloat_float(tnumber: "const Temporal *", d: float) -> "Temporal *": + tnumber_converted = _ffi.cast("const Temporal *", tnumber) + result = _lib.div_tfloat_float(tnumber_converted, d) + _check_error() + return result if result != _ffi.NULL else None + + +def div_tint_int(tnumber: "const Temporal *", i: int) -> "Temporal *": + tnumber_converted = _ffi.cast("const Temporal *", tnumber) + result = _lib.div_tint_int(tnumber_converted, i) + _check_error() + return result if result != _ffi.NULL else None + + +def div_tnumber_tnumber( + tnumber1: "const Temporal *", tnumber2: "const Temporal *" +) -> "Temporal *": + tnumber1_converted = _ffi.cast("const Temporal *", tnumber1) + tnumber2_converted = _ffi.cast("const Temporal *", tnumber2) + result = _lib.div_tnumber_tnumber(tnumber1_converted, tnumber2_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def float_degrees(value: float, normalize: bool) -> "double": + result = _lib.float_degrees(value, normalize) + _check_error() + return result if result != _ffi.NULL else None + + +def mult_float_tfloat(d: float, tnumber: "const Temporal *") -> "Temporal *": + tnumber_converted = _ffi.cast("const Temporal *", tnumber) + result = _lib.mult_float_tfloat(d, tnumber_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def mult_int_tint(i: int, tnumber: "const Temporal *") -> "Temporal *": + tnumber_converted = _ffi.cast("const Temporal *", tnumber) + result = _lib.mult_int_tint(i, tnumber_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def mult_tfloat_float(tnumber: "const Temporal *", d: float) -> "Temporal *": + tnumber_converted = _ffi.cast("const Temporal *", tnumber) + result = _lib.mult_tfloat_float(tnumber_converted, d) + _check_error() + return result if result != _ffi.NULL else None + + +def mult_tint_int(tnumber: "const Temporal *", i: int) -> "Temporal *": + tnumber_converted = _ffi.cast("const Temporal *", tnumber) + result = _lib.mult_tint_int(tnumber_converted, i) + _check_error() + return result if result != _ffi.NULL else None + + +def mult_tnumber_tnumber( + tnumber1: "const Temporal *", tnumber2: "const Temporal *" +) -> "Temporal *": + tnumber1_converted = _ffi.cast("const Temporal *", tnumber1) + tnumber2_converted = _ffi.cast("const Temporal *", tnumber2) + result = _lib.mult_tnumber_tnumber(tnumber1_converted, tnumber2_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def sub_float_tfloat(d: float, tnumber: "const Temporal *") -> "Temporal *": + tnumber_converted = _ffi.cast("const Temporal *", tnumber) + result = _lib.sub_float_tfloat(d, tnumber_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def sub_int_tint(i: int, tnumber: "const Temporal *") -> "Temporal *": + tnumber_converted = _ffi.cast("const Temporal *", tnumber) + result = _lib.sub_int_tint(i, tnumber_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def sub_tfloat_float(tnumber: "const Temporal *", d: float) -> "Temporal *": + tnumber_converted = _ffi.cast("const Temporal *", tnumber) + result = _lib.sub_tfloat_float(tnumber_converted, d) + _check_error() + return result if result != _ffi.NULL else None + + +def sub_tint_int(tnumber: "const Temporal *", i: int) -> "Temporal *": + tnumber_converted = _ffi.cast("const Temporal *", tnumber) + result = _lib.sub_tint_int(tnumber_converted, i) + _check_error() + return result if result != _ffi.NULL else None + + +def sub_tnumber_tnumber( + tnumber1: "const Temporal *", tnumber2: "const Temporal *" +) -> "Temporal *": + tnumber1_converted = _ffi.cast("const Temporal *", tnumber1) + tnumber2_converted = _ffi.cast("const Temporal *", tnumber2) + result = _lib.sub_tnumber_tnumber(tnumber1_converted, tnumber2_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def tfloat_round(temp: "const Temporal *", maxdd: int) -> "Temporal *": + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.tfloat_round(temp_converted, maxdd) + _check_error() + return result if result != _ffi.NULL else None + + +def tfloatarr_round(temp: "const Temporal **", count: int, maxdd: int) -> "Temporal **": + temp_converted = [_ffi.cast("const Temporal *", x) for x in temp] + result = _lib.tfloatarr_round(temp_converted, count, maxdd) + _check_error() + return result if result != _ffi.NULL else None + + +def tfloat_degrees(temp: "const Temporal *", normalize: bool) -> "Temporal *": + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.tfloat_degrees(temp_converted, normalize) + _check_error() + return result if result != _ffi.NULL else None + + +def tfloat_derivative(temp: "const Temporal *") -> "Temporal *": + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.tfloat_derivative(temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def tfloat_radians(temp: "const Temporal *") -> "Temporal *": + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.tfloat_radians(temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def tnumber_abs(temp: "const Temporal *") -> "Temporal *": + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.tnumber_abs(temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def tnumber_angular_difference(temp: "const Temporal *") -> "Temporal *": + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.tnumber_angular_difference(temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def tnumber_delta_value(temp: "const Temporal *") -> "Temporal *": + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.tnumber_delta_value(temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def textcat_text_ttext(txt: str, temp: "const Temporal *") -> "Temporal *": + txt_converted = cstring2text(txt) + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.textcat_text_ttext(txt_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def textcat_ttext_text(temp: "const Temporal *", txt: str) -> "Temporal *": + temp_converted = _ffi.cast("const Temporal *", temp) + txt_converted = cstring2text(txt) + result = _lib.textcat_ttext_text(temp_converted, txt_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def textcat_ttext_ttext( + temp1: "const Temporal *", temp2: "const Temporal *" +) -> "Temporal *": + temp1_converted = _ffi.cast("const Temporal *", temp1) + temp2_converted = _ffi.cast("const Temporal *", temp2) + result = _lib.textcat_ttext_ttext(temp1_converted, temp2_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def ttext_upper(temp: "const Temporal *") -> "Temporal *": + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.ttext_upper(temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def ttext_lower(temp: "const Temporal *") -> "Temporal *": + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.ttext_lower(temp_converted) + _check_error() + return result if result != _ffi.NULL else None def distance_tfloat_float(temp: "const Temporal *", d: float) -> "Temporal *": @@ -8684,9 +9970,9 @@ def geo_expand_space(gs: "const GSERIALIZED *", d: float) -> "STBox *": return result if result != _ffi.NULL else None -def geo_to_tpoint(gs: "const GSERIALIZED *") -> "Temporal *": +def geomeas_to_tpoint(gs: "const GSERIALIZED *") -> "Temporal *": gs_converted = _ffi.cast("const GSERIALIZED *", gs) - result = _lib.geo_to_tpoint(gs_converted) + result = _lib.geomeas_to_tpoint(gs_converted) _check_error() return result if result != _ffi.NULL else None @@ -8772,13 +10058,13 @@ def tpoint_set_srid(temp: "const Temporal *", srid: int) -> "Temporal *": return result if result != _ffi.NULL else None -def tpoint_to_geo_meas( +def tpoint_tfloat_to_geomeas( tpoint: "const Temporal *", measure: "const Temporal *", segmentize: bool ) -> "GSERIALIZED **": tpoint_converted = _ffi.cast("const Temporal *", tpoint) measure_converted = _ffi.cast("const Temporal *", measure) out_result = _ffi.new("GSERIALIZED **") - result = _lib.tpoint_to_geo_meas( + result = _lib.tpoint_tfloat_to_geomeas( tpoint_converted, measure_converted, segmentize, out_result ) _check_error() @@ -9288,6 +10574,37 @@ def tstzspan_bucket_list( return result if result != _ffi.NULL else None, count[0] +def stbox_tile( + point: "GSERIALIZED *", + t: int, + xsize: float, + ysize: float, + zsize: float, + duration: "Interval *", + sorigin: "GSERIALIZED *", + torigin: int, + hast: bool, +) -> "STBox *": + point_converted = _ffi.cast("GSERIALIZED *", point) + t_converted = _ffi.cast("TimestampTz", t) + duration_converted = _ffi.cast("Interval *", duration) + sorigin_converted = _ffi.cast("GSERIALIZED *", sorigin) + torigin_converted = _ffi.cast("TimestampTz", torigin) + result = _lib.stbox_tile( + point_converted, + t_converted, + xsize, + ysize, + zsize, + duration_converted, + sorigin_converted, + torigin_converted, + hast, + ) + _check_error() + return result if result != _ffi.NULL else None + + def stbox_tile_list( bounds: "const STBox *", xsize: float, @@ -9551,14 +10868,36 @@ def tpoint_space_time_split( ) -def meostype_name(type: "meosType") -> str: - type_converted = _ffi.cast("meosType", type) - result = _lib.meostype_name(type_converted) +def temptype_subtype(subtype: "tempSubtype") -> "bool": + subtype_converted = _ffi.cast("tempSubtype", subtype) + result = _lib.temptype_subtype(subtype_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def temptype_subtype_all(subtype: "tempSubtype") -> "bool": + subtype_converted = _ffi.cast("tempSubtype", subtype) + result = _lib.temptype_subtype_all(subtype_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def tempsubtype_name(subtype: "tempSubtype") -> str: + subtype_converted = _ffi.cast("tempSubtype", subtype) + result = _lib.tempsubtype_name(subtype_converted) _check_error() result = _ffi.string(result).decode("utf-8") return result if result != _ffi.NULL else None +def tempsubtype_from_string(string: str, subtype: "int16 *") -> "bool": + string_converted = string.encode("utf-8") + subtype_converted = _ffi.cast("int16 *", subtype) + result = _lib.tempsubtype_from_string(string_converted, subtype_converted) + _check_error() + return result if result != _ffi.NULL else None + + def meosoper_name(oper: "meosOper") -> str: oper_converted = _ffi.cast("meosOper", oper) result = _lib.meosoper_name(oper_converted) @@ -9567,6 +10906,36 @@ def meosoper_name(oper: "meosOper") -> str: return result if result != _ffi.NULL else None +def meosoper_from_string(name: str) -> "meosOper": + name_converted = name.encode("utf-8") + result = _lib.meosoper_from_string(name_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def interptype_name(interp: "interpType") -> str: + interp_converted = _ffi.cast("interpType", interp) + result = _lib.interptype_name(interp_converted) + _check_error() + result = _ffi.string(result).decode("utf-8") + return result if result != _ffi.NULL else None + + +def interptype_from_string(interp_str: str) -> "interpType": + interp_str_converted = interp_str.encode("utf-8") + result = _lib.interptype_from_string(interp_str_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def meostype_name(type: "meosType") -> str: + type_converted = _ffi.cast("meosType", type) + result = _lib.meostype_name(type_converted) + _check_error() + result = _ffi.string(result).decode("utf-8") + return result if result != _ffi.NULL else None + + def temptype_basetype(type: "meosType") -> "meosType": type_converted = _ffi.cast("meosType", type) result = _lib.temptype_basetype(type_converted) @@ -10310,6 +11679,13 @@ def set_values(s: "const Set *") -> "Datum *": return result if result != _ffi.NULL else None +def spanset_lower(ss: "const SpanSet *") -> "Datum": + ss_converted = _ffi.cast("const SpanSet *", ss) + result = _lib.spanset_lower(ss_converted) + _check_error() + return result if result != _ffi.NULL else None + + def spanset_mem_size(ss: "const SpanSet *") -> "int": ss_converted = _ffi.cast("const SpanSet *", ss) result = _lib.spanset_mem_size(ss_converted) @@ -10317,6 +11693,13 @@ def spanset_mem_size(ss: "const SpanSet *") -> "int": return result if result != _ffi.NULL else None +def spanset_upper(ss: "const SpanSet *") -> "Datum": + ss_converted = _ffi.cast("const SpanSet *", ss) + result = _lib.spanset_upper(ss_converted) + _check_error() + return result if result != _ffi.NULL else None + + def spatialset_set_stbox(set: "const Set *", box: "STBox *") -> None: set_converted = _ffi.cast("const Set *", set) box_converted = _ffi.cast("STBox *", box) @@ -11430,13 +12813,24 @@ def tstzset_set_tbox(s: "const Set *", box: "TBox *") -> None: def tbox_shift_scale_value( - box: "const TBox *", shift: "Datum", width: "Datum", hasshift: bool, haswidth: bool + box: "const TBox *", + shift: "Datum", + width: "Datum", + basetype: "meosType", + hasshift: bool, + haswidth: bool, ) -> "TBox *": box_converted = _ffi.cast("const TBox *", box) shift_converted = _ffi.cast("Datum", shift) width_converted = _ffi.cast("Datum", width) + basetype_converted = _ffi.cast("meosType", basetype) result = _lib.tbox_shift_scale_value( - box_converted, shift_converted, width_converted, hasshift, haswidth + box_converted, + shift_converted, + width_converted, + basetype_converted, + hasshift, + haswidth, ) _check_error() return result if result != _ffi.NULL else None @@ -11772,12 +13166,12 @@ def tgeompointseqset_in(string: str) -> "TSequenceSet *": def tinstant_as_mfjson( - inst: "const TInstant *", precision: int, with_bbox: bool, srs: str + inst: "const TInstant *", with_bbox: bool, precision: int, srs: str ) -> str: inst_converted = _ffi.cast("const TInstant *", inst) srs_converted = srs.encode("utf-8") result = _lib.tinstant_as_mfjson( - inst_converted, precision, with_bbox, srs_converted + inst_converted, with_bbox, precision, srs_converted ) _check_error() result = _ffi.string(result).decode("utf-8") @@ -11928,12 +13322,12 @@ def tpointseqset_as_mfjson( def tsequence_as_mfjson( - seq: "const TSequence *", precision: int, with_bbox: bool, srs: str + seq: "const TSequence *", with_bbox: bool, precision: int, srs: str ) -> str: seq_converted = _ffi.cast("const TSequence *", seq) srs_converted = srs.encode("utf-8") result = _lib.tsequence_as_mfjson( - seq_converted, precision, with_bbox, srs_converted + seq_converted, with_bbox, precision, srs_converted ) _check_error() result = _ffi.string(result).decode("utf-8") @@ -11977,12 +13371,12 @@ def tsequence_out(seq: "const TSequence *", maxdd: int) -> str: def tsequenceset_as_mfjson( - ss: "const TSequenceSet *", precision: int, with_bbox: bool, srs: str + ss: "const TSequenceSet *", with_bbox: bool, precision: int, srs: str ) -> str: ss_converted = _ffi.cast("const TSequenceSet *", ss) srs_converted = srs.encode("utf-8") result = _lib.tsequenceset_as_mfjson( - ss_converted, precision, with_bbox, srs_converted + ss_converted, with_bbox, precision, srs_converted ) _check_error() result = _ffi.string(result).decode("utf-8") @@ -12569,9 +13963,9 @@ def tsequence_duration(seq: "const TSequence *") -> "Interval *": return result if result != _ffi.NULL else None -def tsequence_end_timestamp(seq: "const TSequence *") -> "TimestampTz": +def tsequence_end_timestamptz(seq: "const TSequence *") -> "TimestampTz": seq_converted = _ffi.cast("const TSequence *", seq) - result = _lib.tsequence_end_timestamp(seq_converted) + result = _lib.tsequence_end_timestamptz(seq_converted) _check_error() return result if result != _ffi.NULL else None @@ -12655,9 +14049,9 @@ def tsequenceset_expand_bbox(ss: "TSequenceSet *", seq: "const TSequence *") -> _check_error() -def tsequence_start_timestamp(seq: "const TSequence *") -> "TimestampTz": +def tsequence_start_timestamptz(seq: "const TSequence *") -> "TimestampTz": seq_converted = _ffi.cast("const TSequence *", seq) - result = _lib.tsequence_start_timestamp(seq_converted) + result = _lib.tsequence_start_timestamptz(seq_converted) _check_error() return result if result != _ffi.NULL else None @@ -12707,9 +14101,9 @@ def tsequenceset_duration(ss: "const TSequenceSet *", boundspan: bool) -> "Inter return result if result != _ffi.NULL else None -def tsequenceset_end_timestamp(ss: "const TSequenceSet *") -> "TimestampTz": +def tsequenceset_end_timestamptz(ss: "const TSequenceSet *") -> "TimestampTz": ss_converted = _ffi.cast("const TSequenceSet *", ss) - result = _lib.tsequenceset_end_timestamp(ss_converted) + result = _lib.tsequenceset_end_timestamptz(ss_converted) _check_error() return result if result != _ffi.NULL else None @@ -12806,9 +14200,9 @@ def tsequenceset_set_bbox(ss: "const TSequenceSet *", box: "void *") -> None: _check_error() -def tsequenceset_start_timestamp(ss: "const TSequenceSet *") -> "TimestampTz": +def tsequenceset_start_timestamptz(ss: "const TSequenceSet *") -> "TimestampTz": ss_converted = _ffi.cast("const TSequenceSet *", ss) - result = _lib.tsequenceset_start_timestamp(ss_converted) + result = _lib.tsequenceset_start_timestamptz(ss_converted) _check_error() return result if result != _ffi.NULL else None @@ -12827,10 +14221,10 @@ def tsequenceset_timespan(ss: "const TSequenceSet *") -> "Interval *": return result if result != _ffi.NULL else None -def tsequenceset_timestamp_n(ss: "const TSequenceSet *", n: int) -> int: +def tsequenceset_timestamptz_n(ss: "const TSequenceSet *", n: int) -> int: ss_converted = _ffi.cast("const TSequenceSet *", ss) out_result = _ffi.new("TimestampTz *") - result = _lib.tsequenceset_timestamp_n(ss_converted, n, out_result) + result = _lib.tsequenceset_timestamptz_n(ss_converted, n, out_result) _check_error() if result: return out_result[0] if out_result[0] != _ffi.NULL else None @@ -13598,11 +14992,11 @@ def tsequence_restrict_value( def tsequence_restrict_values( - seq: "const TSequence *", set: "const Set *", atfunc: bool + seq: "const TSequence *", s: "const Set *", atfunc: bool ) -> "TSequenceSet *": seq_converted = _ffi.cast("const TSequence *", seq) - set_converted = _ffi.cast("const Set *", set) - result = _lib.tsequence_restrict_values(seq_converted, set_converted, atfunc) + s_converted = _ffi.cast("const Set *", s) + result = _lib.tsequence_restrict_values(seq_converted, s_converted, atfunc) _check_error() return result if result != _ffi.NULL else None @@ -13667,11 +15061,11 @@ def tsequenceset_restrict_value( def tsequenceset_restrict_values( - ss: "const TSequenceSet *", set: "const Set *", atfunc: bool + ss: "const TSequenceSet *", s: "const Set *", atfunc: bool ) -> "TSequenceSet *": ss_converted = _ffi.cast("const TSequenceSet *", ss) - set_converted = _ffi.cast("const Set *", set) - result = _lib.tsequenceset_restrict_values(ss_converted, set_converted, atfunc) + s_converted = _ffi.cast("const Set *", s) + result = _lib.tsequenceset_restrict_values(ss_converted, s_converted, atfunc) _check_error() return result if result != _ffi.NULL else None @@ -14370,6 +15764,225 @@ def tsequenceset_compact(ss: "const TSequenceSet *") -> "TSequenceSet *": return result if result != _ffi.NULL else None +def tbool_tand_transfn( + state: "Optional['SkipList *']", temp: "const Temporal *" +) -> "SkipList *": + state_converted = _ffi.cast("SkipList *", state) if state is not None else _ffi.NULL + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.tbool_tand_transfn(state_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def tbool_tor_transfn( + state: "Optional['SkipList *']", temp: "const Temporal *" +) -> "SkipList *": + state_converted = _ffi.cast("SkipList *", state) if state is not None else _ffi.NULL + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.tbool_tor_transfn(state_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def temporal_tagg_finalfn(state: "SkipList *") -> "Temporal *": + state_converted = _ffi.cast("SkipList *", state) + result = _lib.temporal_tagg_finalfn(state_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def temporal_tcount_transfn( + state: "Optional['SkipList *']", temp: "const Temporal *" +) -> "SkipList *": + state_converted = _ffi.cast("SkipList *", state) if state is not None else _ffi.NULL + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.temporal_tcount_transfn(state_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def tfloat_tmax_transfn( + state: "Optional['SkipList *']", temp: "const Temporal *" +) -> "SkipList *": + state_converted = _ffi.cast("SkipList *", state) if state is not None else _ffi.NULL + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.tfloat_tmax_transfn(state_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def tfloat_tmin_transfn( + state: "Optional['SkipList *']", temp: "const Temporal *" +) -> "SkipList *": + state_converted = _ffi.cast("SkipList *", state) if state is not None else _ffi.NULL + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.tfloat_tmin_transfn(state_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def tfloat_tsum_transfn( + state: "Optional['SkipList *']", temp: "const Temporal *" +) -> "SkipList *": + state_converted = _ffi.cast("SkipList *", state) if state is not None else _ffi.NULL + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.tfloat_tsum_transfn(state_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def tfloat_wmax_transfn( + state: "SkipList *", temp: "const Temporal *", interval: "const Interval *" +) -> "SkipList *": + state_converted = _ffi.cast("SkipList *", state) + temp_converted = _ffi.cast("const Temporal *", temp) + interval_converted = _ffi.cast("const Interval *", interval) + result = _lib.tfloat_wmax_transfn( + state_converted, temp_converted, interval_converted + ) + _check_error() + return result if result != _ffi.NULL else None + + +def tfloat_wmin_transfn( + state: "SkipList *", temp: "const Temporal *", interval: "const Interval *" +) -> "SkipList *": + state_converted = _ffi.cast("SkipList *", state) + temp_converted = _ffi.cast("const Temporal *", temp) + interval_converted = _ffi.cast("const Interval *", interval) + result = _lib.tfloat_wmin_transfn( + state_converted, temp_converted, interval_converted + ) + _check_error() + return result if result != _ffi.NULL else None + + +def tfloat_wsum_transfn( + state: "SkipList *", temp: "const Temporal *", interval: "const Interval *" +) -> "SkipList *": + state_converted = _ffi.cast("SkipList *", state) + temp_converted = _ffi.cast("const Temporal *", temp) + interval_converted = _ffi.cast("const Interval *", interval) + result = _lib.tfloat_wsum_transfn( + state_converted, temp_converted, interval_converted + ) + _check_error() + return result if result != _ffi.NULL else None + + +def tint_tmin_transfn( + state: "Optional['SkipList *']", temp: "const Temporal *" +) -> "SkipList *": + state_converted = _ffi.cast("SkipList *", state) if state is not None else _ffi.NULL + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.tint_tmin_transfn(state_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def tint_tmax_transfn( + state: "Optional['SkipList *']", temp: "const Temporal *" +) -> "SkipList *": + state_converted = _ffi.cast("SkipList *", state) if state is not None else _ffi.NULL + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.tint_tmax_transfn(state_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def tint_tsum_transfn( + state: "Optional['SkipList *']", temp: "const Temporal *" +) -> "SkipList *": + state_converted = _ffi.cast("SkipList *", state) if state is not None else _ffi.NULL + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.tint_tsum_transfn(state_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def tint_wmax_transfn( + state: "SkipList *", temp: "const Temporal *", interval: "const Interval *" +) -> "SkipList *": + state_converted = _ffi.cast("SkipList *", state) + temp_converted = _ffi.cast("const Temporal *", temp) + interval_converted = _ffi.cast("const Interval *", interval) + result = _lib.tint_wmax_transfn(state_converted, temp_converted, interval_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def tint_wmin_transfn( + state: "SkipList *", temp: "const Temporal *", interval: "const Interval *" +) -> "SkipList *": + state_converted = _ffi.cast("SkipList *", state) + temp_converted = _ffi.cast("const Temporal *", temp) + interval_converted = _ffi.cast("const Interval *", interval) + result = _lib.tint_wmin_transfn(state_converted, temp_converted, interval_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def tint_wsum_transfn( + state: "SkipList *", temp: "const Temporal *", interval: "const Interval *" +) -> "SkipList *": + state_converted = _ffi.cast("SkipList *", state) + temp_converted = _ffi.cast("const Temporal *", temp) + interval_converted = _ffi.cast("const Interval *", interval) + result = _lib.tint_wsum_transfn(state_converted, temp_converted, interval_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def tnumber_tavg_finalfn(state: "SkipList *") -> "Temporal *": + state_converted = _ffi.cast("SkipList *", state) + result = _lib.tnumber_tavg_finalfn(state_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def tnumber_tavg_transfn( + state: "Optional['SkipList *']", temp: "const Temporal *" +) -> "SkipList *": + state_converted = _ffi.cast("SkipList *", state) if state is not None else _ffi.NULL + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.tnumber_tavg_transfn(state_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def tnumber_wavg_transfn( + state: "SkipList *", temp: "const Temporal *", interval: "const Interval *" +) -> "SkipList *": + state_converted = _ffi.cast("SkipList *", state) + temp_converted = _ffi.cast("const Temporal *", temp) + interval_converted = _ffi.cast("const Interval *", interval) + result = _lib.tnumber_wavg_transfn( + state_converted, temp_converted, interval_converted + ) + _check_error() + return result if result != _ffi.NULL else None + + +def ttext_tmin_transfn( + state: "Optional['SkipList *']", temp: "const Temporal *" +) -> "SkipList *": + state_converted = _ffi.cast("SkipList *", state) if state is not None else _ffi.NULL + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.ttext_tmin_transfn(state_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + +def ttext_tmax_transfn( + state: "Optional['SkipList *']", temp: "const Temporal *" +) -> "SkipList *": + state_converted = _ffi.cast("SkipList *", state) if state is not None else _ffi.NULL + temp_converted = _ffi.cast("const Temporal *", temp) + result = _lib.ttext_tmax_transfn(state_converted, temp_converted) + _check_error() + return result if result != _ffi.NULL else None + + def tnumber_value_split( temp: "const Temporal *", size: "Datum", origin: "Datum", buckets: "Datum **" ) -> "Tuple['Temporal **', 'int']":