34#ifndef __MEOS_INTERNAL_H__
35#define __MEOS_INTERNAL_H__
40#include <json-c/json.h>
42#include <gsl/gsl_rng.h>
43#include <gsl/gsl_randist.h>
49#include "temporal/meos_catalog.h"
59 #define VALIDATE_NOT_NULL(ptr, ret) \
60 do { if (! ensure_not_null((void *) (ptr))) return (ret); } while (0)
62 #define VALIDATE_NOT_NULL(ptr, ret) \
63 do { assert(ptr); } while (0)
72 #define VALIDATE_INTSET(set, ret) \
74 if (! ensure_not_null((void *) (set)) || \
75 ! ensure_set_isof_type((set), T_INTSET) ) \
79 #define VALIDATE_INTSET(set, ret) \
82 assert((set)->settype == T_INTSET); \
90 #define VALIDATE_BIGINTSET(set, ret) \
92 if (! ensure_not_null((void *) (set)) || \
93 ! ensure_set_isof_type((set), T_BIGINTSET) ) \
97 #define VALIDATE_BIGINTSET(set, ret) \
100 assert((set)->settype == T_BIGINTSET); \
108 #define VALIDATE_FLOATSET(set, ret) \
110 if (! ensure_not_null((void *) (set)) || \
111 ! ensure_set_isof_type((set), T_FLOATSET) ) \
115 #define VALIDATE_FLOATSET(set, ret) \
118 assert((set)->settype == T_FLOATSET); \
126 #define VALIDATE_TEXTSET(set, ret) \
128 if (! ensure_not_null((void *) (set)) || \
129 ! ensure_set_isof_type((set), T_TEXTSET) ) \
133 #define VALIDATE_TEXTSET(set, ret) \
136 assert((set)->settype == T_TEXTSET); \
144 #define VALIDATE_DATESET(set, ret) \
146 if (! ensure_not_null((void *) (set)) || \
147 ! ensure_set_isof_type((set), T_DATESET) ) \
151 #define VALIDATE_DATESET(set, ret) \
154 assert((set)->settype == T_DATESET); \
162 #define VALIDATE_TSTZSET(set, ret) \
164 if (! ensure_not_null((void *) (set)) || \
165 ! ensure_set_isof_type((set), T_TSTZSET) ) \
169 #define VALIDATE_TSTZSET(set, ret) \
172 assert((set)->settype == T_TSTZSET); \
180 #define VALIDATE_NUMSET(set, ret) \
182 if (! ensure_not_null((void *) (set)) || \
183 ! ensure_numset_type((set)->settype) ) \
187 #define VALIDATE_NUMSET(set, ret) \
190 assert(numset_type((set)->settype)); \
200 #define VALIDATE_INTSPAN(span, ret) \
202 if (! ensure_not_null((void *) (span)) || \
203 ! ensure_span_isof_type((span), T_INTSPAN) ) \
207 #define VALIDATE_INTSPAN(span, ret) \
210 assert((span)->spantype == T_INTSPAN); \
218 #define VALIDATE_BIGINTSPAN(span, ret) \
220 if (! ensure_not_null((void *) (span)) || \
221 ! ensure_span_isof_type((span), T_BIGINTSPAN) ) \
225 #define VALIDATE_BIGINTSPAN(span, ret) \
228 assert((span)->spantype == T_BIGINTSPAN); \
236 #define VALIDATE_FLOATSPAN(span, ret) \
238 if (! ensure_not_null((void *) (span)) || \
239 ! ensure_span_isof_type((span), T_FLOATSPAN) ) \
243 #define VALIDATE_FLOATSPAN(span, ret) \
246 assert((span)->spantype == T_FLOATSPAN); \
254 #define VALIDATE_DATESPAN(span, ret) \
256 if (! ensure_not_null((void *) (span)) || \
257 ! ensure_span_isof_type((span), T_DATESPAN) ) \
261 #define VALIDATE_DATESPAN(span, ret) \
264 assert((span)->spantype == T_DATESPAN); \
273 #define VALIDATE_TSTZSPAN(span, ret) \
275 if (! ensure_not_null((void *) (span)) || \
276 ! ensure_span_isof_type((span), T_TSTZSPAN) ) \
280 #define VALIDATE_TSTZSPAN(span, ret) \
283 assert((span)->spantype == T_TSTZSPAN); \
291 #define VALIDATE_NUMSPAN(span, ret) \
293 if (! ensure_not_null((void *) (span)) || \
294 ! ensure_numspan_type((span)->spantype) ) \
298 #define VALIDATE_NUMSPAN(span, ret) \
301 assert(numspan_type((span)->spantype)); \
311 #define VALIDATE_INTSPANSET(ss, ret) \
313 if (! ensure_not_null((void *) (ss)) || \
314 ! ensure_spanset_isof_type((ss), T_INTSPANSET) ) \
318 #define VALIDATE_INTSPANSET(ss, ret) \
321 assert((ss)->spansettype == T_INTSPANSET); \
329 #define VALIDATE_BIGINTSPANSET(ss, ret) \
331 if (! ensure_not_null((void *) (ss)) || \
332 ! ensure_spanset_isof_type((ss), T_BIGINTSPANSET) ) \
336 #define VALIDATE_BIGINTSPANSET(ss, ret) \
339 assert((ss)->spansettype == T_BIGINTSPANSET); \
347 #define VALIDATE_FLOATSPANSET(ss, ret) \
349 if (! ensure_not_null((void *) (ss)) || \
350 ! ensure_spanset_isof_type((ss), T_FLOATSPANSET) ) \
354 #define VALIDATE_FLOATSPANSET(ss, ret) \
357 assert((ss)->spansettype == T_FLOATSPANSET); \
365 #define VALIDATE_DATESPANSET(ss, ret) \
367 if (! ensure_not_null((void *) (ss)) || \
368 ! ensure_spanset_isof_type((ss), T_DATESPANSET) ) \
372 #define VALIDATE_DATESPANSET(ss, ret) \
375 assert((ss)->spansettype == T_DATESPANSET); \
383 #define VALIDATE_TSTZSPANSET(ss, ret) \
385 if (! ensure_not_null((void *) (ss)) || \
386 ! ensure_spanset_isof_type(ss, T_TSTZSPANSET) ) \
390 #define VALIDATE_TSTZSPANSET(ss, ret) \
393 assert((ss)->spansettype == T_TSTZSPANSET); \
401 #define VALIDATE_NUMSPANSET(ss, ret) \
403 if (! ensure_not_null((void *) (ss)) || \
404 ! ensure_numspanset_type((ss)->spansettype) ) \
408 #define VALIDATE_NUMSPANSET(ss, ret) \
411 assert(numspanset_type((ss)->spansettype)); \
423 #define VALIDATE_TBOOL(temp, ret) \
425 if (! ensure_not_null((void *) (temp)) || \
426 ! ensure_temporal_isof_type((Temporal *) (temp), T_TBOOL) ) \
430 #define VALIDATE_TBOOL(temp, ret) \
433 assert(((Temporal *) (temp))->temptype == T_TBOOL); \
443 #define VALIDATE_TINT(temp, ret) \
445 if (! ensure_not_null((void *) (temp)) || \
446 ! ensure_temporal_isof_type((Temporal *) (temp), T_TINT) ) \
450 #define VALIDATE_TINT(temp, ret) \
453 assert(((Temporal *) (temp))->temptype == T_TINT); \
463 #define VALIDATE_TFLOAT(temp, ret) \
465 if (! ensure_not_null((void *) (temp)) || \
466 ! ensure_temporal_isof_type((Temporal *) (temp), T_TFLOAT) ) \
470 #define VALIDATE_TFLOAT(temp, ret) \
473 assert(((Temporal *) (temp))->temptype == T_TFLOAT); \
483 #define VALIDATE_TTEXT(temp, ret) \
485 if (! ensure_not_null((void *) (temp)) || \
486 ! ensure_temporal_isof_type((Temporal *) (temp), T_TTEXT) ) \
490 #define VALIDATE_TTEXT(temp, ret) \
493 assert(((Temporal *) (temp))->temptype == T_TTEXT); \
503 #define VALIDATE_TNUMBER(temp, ret) \
505 if (! ensure_not_null((void *) (temp)) || \
506 ! ensure_tnumber_type(((Temporal *) (temp))->temptype) ) \
510 #define VALIDATE_TNUMBER(temp, ret) \
513 assert(tnumber_type(((Temporal *) (temp))->temptype)); \
537#define MEOS_FLAG_BYVAL 0x0001
539#define MEOS_FLAG_ORDERED 0x0002
541#define MEOS_FLAG_CONTINUOUS 0x0002
543#define MEOS_FLAGS_INTERP 0x000C
545#define MEOS_FLAG_X 0x0010
546#define MEOS_FLAG_Z 0x0020
547#define MEOS_FLAG_T 0x0040
548#define MEOS_FLAG_GEODETIC 0x0080
549#define MEOS_FLAG_GEOM 0x0100
551#define MEOS_FLAGS_GET_BYVAL(flags) ((bool) (((flags) & MEOS_FLAG_BYVAL)))
552#define MEOS_FLAGS_GET_ORDERED(flags) ((bool) (((flags) & MEOS_FLAG_ORDERED)>>1))
553#define MEOS_FLAGS_GET_CONTINUOUS(flags) ((bool) (((flags) & MEOS_FLAG_CONTINUOUS)>>1))
554#define MEOS_FLAGS_GET_X(flags) ((bool) (((flags) & MEOS_FLAG_X)>>4))
555#define MEOS_FLAGS_GET_Z(flags) ((bool) (((flags) & MEOS_FLAG_Z)>>5))
556#define MEOS_FLAGS_GET_T(flags) ((bool) (((flags) & MEOS_FLAG_T)>>6))
557#define MEOS_FLAGS_GET_GEODETIC(flags) ((bool) (((flags) & MEOS_FLAG_GEODETIC)>>7))
558#define MEOS_FLAGS_GET_GEOM(flags) ((bool) (((flags) & MEOS_FLAG_GEOM)>>8))
560#define MEOS_FLAGS_BYREF(flags) ((bool) (((flags) & ! MEOS_FLAG_BYVAL)))
562#define MEOS_FLAGS_SET_BYVAL(flags, value) \
563 ((flags) = (value) ? ((flags) | MEOS_FLAG_BYVAL) : ((flags) & ~MEOS_FLAG_BYVAL))
564#define MEOS_FLAGS_SET_ORDERED(flags, value) \
565 ((flags) = (value) ? ((flags) | MEOS_FLAG_ORDERED) : ((flags) & ~MEOS_FLAG_ORDERED))
566#define MEOS_FLAGS_SET_CONTINUOUS(flags, value) \
567 ((flags) = (value) ? ((flags) | MEOS_FLAG_CONTINUOUS) : ((flags) & ~MEOS_FLAG_CONTINUOUS))
568#define MEOS_FLAGS_SET_X(flags, value) \
569 ((flags) = (value) ? ((flags) | MEOS_FLAG_X) : ((flags) & ~MEOS_FLAG_X))
570#define MEOS_FLAGS_SET_Z(flags, value) \
571 ((flags) = (value) ? ((flags) | MEOS_FLAG_Z) : ((flags) & ~MEOS_FLAG_Z))
572#define MEOS_FLAGS_SET_T(flags, value) \
573 ((flags) = (value) ? ((flags) | MEOS_FLAG_T) : ((flags) & ~MEOS_FLAG_T))
574#define MEOS_FLAGS_SET_GEODETIC(flags, value) \
575 ((flags) = (value) ? ((flags) | MEOS_FLAG_GEODETIC) : ((flags) & ~MEOS_FLAG_GEODETIC))
576#define MEOS_FLAGS_SET_GEOM(flags, value) \
577 ((flags) = (value) ? ((flags) | MEOS_FLAG_GEOM) : ((flags) & ~MEOS_FLAG_GEOM))
579#define MEOS_FLAGS_GET_INTERP(flags) (((flags) & MEOS_FLAGS_INTERP) >> 2)
580#define MEOS_FLAGS_SET_INTERP(flags, value) ((flags) = (((flags) & ~MEOS_FLAGS_INTERP) | ((value & 0x0003) << 2)))
582#define MEOS_FLAGS_DISCRETE_INTERP(flags) ((bool) (MEOS_FLAGS_GET_INTERP((flags)) == DISCRETE))
583#define MEOS_FLAGS_STEP_INTERP(flags) ((bool) (MEOS_FLAGS_GET_INTERP((flags)) == STEP))
584#define MEOS_FLAGS_LINEAR_INTERP(flags) ((bool) (MEOS_FLAGS_GET_INTERP((flags)) == LINEAR))
585#define MEOS_FLAGS_STEP_LINEAR_INTERP(flags) \
586 ((bool) (MEOS_FLAGS_GET_INTERP((flags)) == STEP || MEOS_FLAGS_GET_INTERP((flags)) == LINEAR))
603#define SET_BBOX_PTR(s) ( (void *)( \
604 ((char *) (s)) + DOUBLE_PAD(sizeof(Set)) ) )
609#define SET_OFFSETS_PTR(s) ( (size_t *)( \
610 ((char *) (s)) + DOUBLE_PAD(sizeof(Set)) + DOUBLE_PAD((s)->bboxsize) ) )
616#define SET_VAL_N(s, index) ( (Datum) ( \
617 MEOS_FLAGS_GET_BYVAL((s)->flags) ? (SET_OFFSETS_PTR(s))[index] : \
618 PointerGetDatum( ((char *) (s)) + DOUBLE_PAD(sizeof(Set)) + \
619 DOUBLE_PAD((s)->bboxsize) + (sizeof(size_t) * (s)->maxcount) + \
620 (SET_OFFSETS_PTR(s))[index] ) ) )
628#define SPANSET_SP_N(ss, index) (const Span *) &((ss)->elems[(index)])
645#define TSEQUENCE_OFFSETS_PTR(seq) ( (size_t *)( \
646 ((char *) &((seq)->period)) + (seq)->bboxsize ) )
654#define TSEQUENCE_INST_N(seq, index) ( (const TInstant *)( \
655 ((char *) &((seq)->period)) + (seq)->bboxsize + \
656 (sizeof(size_t) * (seq)->maxcount) + (TSEQUENCE_OFFSETS_PTR(seq))[index] ) )
662#define TSEQUENCESET_OFFSETS_PTR(ss) ( (size_t *)( \
663 ((char *) &((ss)->period)) + (ss)->bboxsize ) )
671#define TSEQUENCESET_SEQ_N(ss, index) ( (const TSequence *)( \
672 ((char *) &((ss)->period)) + (ss)->bboxsize + \
673 (sizeof(size_t) * (ss)->maxcount) + (TSEQUENCESET_OFFSETS_PTR(ss))[index] ) )
688#define TimestampTzGetDatum(X) Int64GetDatum(X)
689#define DatumGetTimestampTz(X)((TimestampTz) DatumGetInt64(X))
TBox * number_timestamptz_to_tbox(Datum d, meosType basetype, TimestampTz t)
Return a temporal box from an integer and a timestamptz.
Definition: tbox.c:232
TBox * number_tstzspan_to_tbox(Datum d, meosType basetype, const Span *s)
Return a temporal box from an integer and a timestamptz span.
Definition: tbox.c:279
void tbox_set(const Span *s, const Span *p, TBox *box)
Return in the last argument a temporal box constructed from a number span and a timestamptz span.
Definition: tbox.c:186
void int_set_tbox(int i, TBox *box)
Return in the last argument a temporal box constructed from an integer.
Definition: tbox.c:403
void number_set_tbox(Datum d, meosType basetype, TBox *box)
Return in the last argument a temporal box constructed from a number.
Definition: tbox.c:367
void numset_set_tbox(const Set *s, TBox *box)
Return in the last argument a temporal box constructed from a number set.
Definition: tbox.c:493
TBox * number_tbox(Datum value, meosType basetype)
Convert a number into a temporal box.
Definition: tbox.c:385
void numspan_set_tbox(const Span *span, TBox *box)
Return in the last argument a temporal box constructed from a number span.
Definition: tbox.c:566
void timestamptz_set_tbox(TimestampTz t, TBox *box)
Return in the last argument a temporal box constructed from a timestamptz.
Definition: tbox.c:461
void tstzspan_set_tbox(const Span *s, TBox *box)
Return in the last argument a temporal box constructed from a timestamptz span.
Definition: tbox.c:581
void float_set_tbox(double d, TBox *box)
Return in the last argument a temporal box constructed from a float.
Definition: tbox.c:431
void tstzset_set_tbox(const Set *s, TBox *box)
Return in the last argument a temporal box constructed from a timestamptz set.
Definition: tbox.c:510
bool inter_tbox_tbox(const TBox *box1, const TBox *box2, TBox *result)
Return in the last argument the intersection of two temporal boxes.
Definition: tbox.c:1636
TBox * tbox_shift_scale_value(const TBox *box, Datum shift, Datum width, bool hasshift, bool haswidth)
Return a temporal box with the value span shifted and/or scaled by the values.
Definition: tbox.c:1080
void tbox_expand(const TBox *box1, TBox *box2)
Return the second temporal box expanded with the first one.
Definition: tbox.c:1190
TBox * tbox_expand_value(const TBox *box, Datum value, meosType basetyp)
Return a temporal box with the value span expanded/decreased by a value.
Definition: tbox.c:1267
const Span ** spanset_sps(const SpanSet *ss)
Return an array of pointers to the spans of a span set.
Definition: spanset.c:1020
Datum spanset_upper(const SpanSet *ss)
Return the lower bound a span set.
Definition: spanset.c:575
Datum * set_values(const Set *s)
Return the array of (copies of) values of a set.
Definition: set.c:711
Datum * set_vals(const Set *s)
Return the array of (pointers to the) values of a set.
Definition: set.c:695
Datum numspan_width(const Span *s)
Return the width of a span.
Definition: span.c:754
bool set_value_n(const Set *s, int n, Datum *result)
Return in the last argument a copy of the n-th value of a set.
Definition: set.c:678
Datum set_start_value(const Set *s)
Return a copy of the start value of a set.
Definition: set.c:648
Datum numspanset_width(const SpanSet *ss, bool boundspan)
Return the width of a span set.
Definition: spanset.c:619
int set_mem_size(const Set *s)
Return the size in bytes of a set.
Definition: set.c:620
Datum set_end_value(const Set *s)
Return a copy of the end value of a set.
Definition: set.c:661
Datum spanset_lower(const SpanSet *ss)
Return the lower bound a span set.
Definition: spanset.c:561
int spanset_mem_size(const SpanSet *ss)
Return the size in bytes of a span set.
Definition: spanset.c:533
Span * spanbase_extent_transfn(Span *state, Datum value, meosType basetype)
Transition function for span extent aggregate of values.
Definition: span_aggfuncs.c:58
Set * value_union_transfn(Set *state, Datum value, meosType basetype)
Transition function for set union aggregate of values.
Definition: set_aggfuncs_meos.c:206
Set * set_make(const Datum *values, int count, meosType basetype, bool order)
Return a set from an array of values.
Definition: set.c:471
Span * span_make(Datum lower, Datum upper, bool lower_inc, bool upper_inc, meosType basetype)
Return a span from the bounds.
Definition: span.c:421
void span_set(Datum lower, Datum upper, bool lower_inc, bool upper_inc, meosType basetype, meosType spantype, Span *s)
Return in the last argument a span constructed from the given arguments.
Definition: span.c:442
SpanSet * spanset_make_exp(Span *spans, int count, int maxcount, bool normalize, bool order)
Return a span set from an array of disjoint spans enabling the data structure to expand.
Definition: spanset.c:269
Set * set_make_free(Datum *values, int count, meosType basetype, bool order)
Return a set from the array of values and free the input array after the creation.
Definition: set.c:488
Set * set_make_exp(const Datum *values, int count, int maxcount, meosType basetype, bool order)
Return a set from an array of values enabling the data structure to expand.
Definition: set.c:325
SpanSet * spanset_make_free(Span *spans, int count, bool normalize, bool order)
Return a span set from an array of spans and free the input array of spans after the creation.
Definition: spanset.c:353
Set * value_set(Datum d, meosType basetype)
Convert a value into a set.
Definition: set.c:527
SpanSet * set_spanset(const Set *s)
Convert a set into a span set.
Definition: spanset.c:405
void set_set_span(const Set *s, Span *result)
Return in the last argument the bounding span of a set.
Definition: span.c:563
SpanSet * value_spanset(Datum d, meosType basetype)
Convert a value into a span set.
Definition: spanset.c:389
void intspan_set_floatspan(const Span *s1, Span *s2)
Return the second span initialized with the first one transformed to a float span.
Definition: span.c:610
void value_set_span(Datum value, meosType basetype, Span *s)
Return in the last argument a span constructed from a value.
Definition: span.c:516
void floatspan_set_intspan(const Span *s1, Span *s2)
Return the second span initialized with the first one transformed to an integer span.
Definition: span.c:642
void tstzspan_set_datespan(const Span *s1, Span *s2)
Return the last span initialized with the first one transformed to a date span.
Definition: span.c:708
void datespan_set_tstzspan(const Span *s1, Span *s2)
Return the second span initialized with the first one transformed to a timetstamptz span.
Definition: span.c:673
void set_set_subspan(const Set *s, int minidx, int maxidx, Span *result)
Return in the last argument the bounding span of a set.
Definition: span.c:547
Span * set_span(const Set *s)
Convert a set into a span.
Definition: span.c:576
Span * value_span(Datum d, meosType basetype)
Convert a value into a span.
Definition: span.c:531
Datum distance_spanset_value(const SpanSet *ss, Datum value)
Return the distance between a span set and a value.
Definition: spanset_ops.c:1300
Datum distance_spanset_span(const SpanSet *ss, const Span *s)
Return the distance between a span set and a span.
Definition: spanset_ops.c:1315
Datum distance_set_value(const Set *s, Datum value)
Return the distance between a set and a value.
Definition: set_ops.c:654
Datum distance_span_span(const Span *s1, const Span *s2)
Return the distance between two spans as a double.
Definition: span_ops.c:953
Datum distance_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2)
Return the distance between two span sets.
Definition: spanset_ops.c:1331
Datum distance_span_value(const Span *s, Datum value)
Return the distance between a span and a value as a double.
Definition: span_ops.c:923
Datum distance_set_set(const Set *s1, const Set *s2)
Return the distance between two sets.
Definition: set_ops.c:670
Datum distance_value_value(Datum l, Datum r, meosType basetype)
Return the distance between two values.
Definition: span_ops.c:890
char * set_out(const Set *s, int maxdd)
Return the Well-Known Text (WKT) representation of a set.
Definition: set.c:213
char * spanset_out(const SpanSet *ss, int maxdd)
Return the Well-Known Text (WKT) representation of a span set.
Definition: spanset.c:227
SpanSet * spanset_in(const char *str, meosType spantype)
Return a span set from its Well-Known Text (WKT) representation.
Definition: spanset.c:213
Set * set_in(const char *str, meosType basetype)
Return a set from its Well-Known Text (WKT) representation.
Definition: set.c:163
char * span_out(const Span *s, int maxdd)
Return the Well-Known Text (WKT) representation of a span.
Definition: span.c:391
Span * span_in(const char *str, meosType spantype)
Return a span from its Well-Known Text (WKT) representation.
Definition: span.c:355
bool right_value_span(Datum value, const Span *s)
Return true if a value is to the right of a span.
Definition: span_ops.c:362
bool overleft_span_value(const Span *s, Datum value)
Return true if a span does not extend to the right of a value.
Definition: span_ops.c:416
bool left_set_value(const Set *s, Datum value)
Return true if a set is to the left of a value.
Definition: set_ops.c:317
bool left_value_set(Datum value, const Set *s)
Return true if a value is to the left of a set.
Definition: set_ops.c:304
bool lfnadj_span_span(const Span *s1, const Span *s2)
Return true if the first span is to the left and not adjacent to the second one.
Definition: span_ops.c:344
bool right_value_spanset(Datum value, const SpanSet *ss)
Return true if a value is to the right of a span set.
Definition: spanset_ops.c:525
bool overleft_value_span(Datum value, const Span *s)
Return true if a value does not extend to the right of a span.
Definition: span_ops.c:402
bool overleft_set_value(const Set *s, Datum value)
Return true if a set does not extend to the right of a value.
Definition: set_ops.c:403
bool overleft_value_set(Datum value, const Set *s)
Return true if a value does not extend to the right of a set.
Definition: set_ops.c:390
bool left_spanset_value(const SpanSet *ss, Datum value)
Return true if a span set is to the left of a value.
Definition: spanset_ops.c:477
bool overright_span_value(const Span *s, Datum value)
Return true if a span does not extend to the left of a value.
Definition: span_ops.c:469
bool overleft_value_spanset(Datum value, const SpanSet *ss)
Return true if a value does not extend to the right of a span set.
Definition: spanset_ops.c:604
bool left_value_spanset(Datum value, const SpanSet *ss)
Return true if a value is to the left of a span set.
Definition: spanset_ops.c:449
bool overright_spanset_value(const SpanSet *ss, Datum value)
Return true if a span set does not extend to the left of a value.
Definition: spanset_ops.c:699
bool left_span_value(const Span *s, Datum value)
Return true if a span is to the left of a value.
Definition: span_ops.c:312
bool overright_set_value(const Set *s, Datum value)
Return true if a set does not extend to the left of a value.
Definition: set_ops.c:450
bool overright_value_spanset(Datum value, const SpanSet *ss)
Return true if a value does not extend to the left of a span set.
Definition: spanset_ops.c:670
bool left_value_span(Datum value, const Span *s)
Return true if a value is to the left of a span.
Definition: span_ops.c:298
bool right_span_value(const Span *s, Datum value)
Return true if a span is to the right of a value.
Definition: span_ops.c:374
bool overright_value_span(Datum value, const Span *s)
Return true if a value does not extend to the left of a span.
Definition: span_ops.c:455
bool right_set_value(const Set *s, Datum value)
Return true if a set is to the right of a value.
Definition: set_ops.c:362
bool overleft_spanset_value(const SpanSet *ss, Datum value)
Return true if a span set does not extend to the right of a value.
Definition: spanset_ops.c:591
bool right_spanset_value(const SpanSet *ss, Datum value)
Return true if a span set is to the right of a value.
Definition: spanset_ops.c:550
bool right_value_set(Datum value, const Set *s)
Return true if a value is to the right of a set.
Definition: set_ops.c:350
bool overright_value_set(Datum value, const Set *s)
Return true if a value does not extend to the the left of a set.
Definition: set_ops.c:437
Set * minus_value_set(Datum value, const Set *s)
Return the difference of a value and a set.
Definition: set_ops.c:595
SpanSet * minus_value_span(Datum value, const Span *s)
Return the difference of a value and a span.
Definition: span_ops.c:684
int mi_span_span(const Span *s1, const Span *s2, Span *result)
Return in the last argument the difference of two spans.
Definition: span_ops.c:762
void bbox_union_span_span(const Span *s1, const Span *s2, Span *result)
Return in the last argument the bounding box union of two spans.
Definition: span_ops.c:506
SpanSet * union_value_span(Datum value, const Span *s)
Return the union of a value and a span.
Definition: span_ops.c:555
Span * intersection_span_value(const Span *s, Datum value)
Return the intersection of a span and a value.
Definition: span_ops.c:608
SpanSet * minus_value_spanset(Datum value, const SpanSet *ss)
Return the difference of a value and a span set.
Definition: spanset_ops.c:1096
Set * intersection_value_set(Datum value, const Set *s)
Return the union of a value and a set.
Definition: set_ops.c:563
Set * union_set_value(const Set *s, Datum value)
Return the union of a set and a value.
Definition: set_ops.c:483
SpanSet * intersection_spanset_value(const SpanSet *ss, Datum value)
Return the intersection of a span set and a value.
Definition: spanset_ops.c:954
SpanSet * intersection_value_spanset(Datum value, const SpanSet *ss)
Return the intersection of a value and a span set.
Definition: spanset_ops.c:969
SpanSet * union_spanset_value(const SpanSet *ss, Datum value)
Return the union of a span set and a value.
Definition: spanset_ops.c:748
SpanSet * union_value_spanset(Datum value, const SpanSet *ss)
Return the union of a value and a span set.
Definition: spanset_ops.c:763
Set * union_value_set(Datum value, const Set *s)
Return the union of a value and a set.
Definition: set_ops.c:517
bool inter_span_span(const Span *s1, const Span *s2, Span *result)
Return in the last argument the intersection of two spans.
Definition: span_ops.c:637
SpanSet * minus_span_value(const Span *s, Datum value)
Return the difference of a span and a value.
Definition: span_ops.c:744
SpanSet * union_span_value(const Span *s, Datum value)
Return the union of a span and a value.
Definition: span_ops.c:540
Set * intersection_set_value(const Set *s, Datum value)
Return the intersection of a set and a value.
Definition: set_ops.c:548
Span * intersection_value_span(Datum value, const Span *s)
Return the union of a value and a span.
Definition: span_ops.c:623
Set * minus_set_value(const Set *s, Datum value)
Return the difference of a set and a value.
Definition: set_ops.c:610
SpanSet * minus_spanset_value(const SpanSet *ss, Datum value)
Return the difference of a span set and a value.
Definition: spanset_ops.c:1178
Span * super_union_span_span(const Span *s1, const Span *s2)
Return the bounding union of two spans.
Definition: span_ops.c:524
bool adjacent_spanset_value(const SpanSet *ss, Datum value)
Return true if a span set and a value are adjacent.
Definition: spanset_ops.c:345
bool contains_spanset_value(const SpanSet *ss, Datum value)
Return true if a span set contains a value.
Definition: spanset_ops.c:59
bool contains_span_value(const Span *s, Datum value)
Return true if a span contains a value.
Definition: span_ops.c:120
bool adjacent_value_spanset(Datum value, const SpanSet *ss)
Return true if a span set and a value are adjacent.
Definition: spanset_ops.c:361
bool contained_value_set(Datum value, const Set *s)
Return true if a value is contained in a set.
Definition: set_ops.c:241
bool contains_set_value(const Set *s, Datum value)
Return true if a set contains a value.
Definition: set_ops.c:186
bool adjacent_span_value(const Span *s, Datum value)
Return true if a span and a value are adjacent.
Definition: span_ops.c:255
bool contained_value_span(Datum value, const Span *s)
Return true if a value is contained in a span.
Definition: span_ops.c:181
bool ovadj_span_span(const Span *s1, const Span *s2)
Return true if two spans overlap or are adjacent.
Definition: span_ops.c:231
bool contained_value_spanset(Datum value, const SpanSet *ss)
Return true if a value is contained in a span set.
Definition: spanset_ops.c:194
SpanSet * numspanset_shift_scale(const SpanSet *ss, Datum shift, Datum width, bool hasshift, bool haswidth)
Return a number set shifted and/or scaled by two intervals.
Definition: spanset.c:1190
void span_expand(const Span *s1, Span *s2)
Return the second span expanded with the first one.
Definition: span.c:940
SpanSet * spanset_compact(const SpanSet *ss)
Return a copy of a span set without any extra storage space.
Definition: spanset.c:1083
void floatspan_round_set(const Span *s, int maxdd, Span *result)
Return in the last argument a float span with the precision set to a number of decimal places.
Definition: span.c:803
Span * numspan_shift_scale(const Span *s, Datum shift, Datum width, bool hasshift, bool haswidth)
Return a number span shifted and/or scaled by two values.
Definition: span.c:1302
Set * numset_shift_scale(const Set *s, Datum shift, Datum width, bool hasshift, bool haswidth)
Return a number set shifted and/or scaled by two values.
Definition: set.c:922
Set * set_compact(const Set *s)
Return a copy of a set ordered, without duplicates, and without any additional free space.
Definition: set.c:758
Span * numspan_expand(const Span *s, Datum value)
Return a number span with its bounds expanded/decreased by a value.
Definition: span.c:967
TimestampTz tsequence_end_timestamptz(const TSequence *seq)
Return the end timestamptz of a temporal sequence.
Definition: tsequence.c:2161
Datum tsequence_min_val(const TSequence *seq)
Return (a pointer to) the minimum base value of a temporal sequence.
Definition: tsequence.c:1941
int tsequenceset_num_instants(const TSequenceSet *ss)
Return the number of distinct instants of a temporal sequence set.
Definition: tsequenceset.c:1026
Datum tinstant_value_p(const TInstant *inst)
Return (a pointer to) the base value of a temporal instant.
Definition: tinstant.c:69
const TInstant * tsequenceset_inst_n(const TSequenceSet *ss, int n)
Return a pointer to the n-th distinct instant of a temporal sequence set.
Definition: tsequenceset.c:1056
double tnumberseqset_twavg(const TSequenceSet *ss)
Return the time-weighted average of a temporal number.
Definition: tsequenceset.c:2079
const TInstant ** tinstant_insts(const TInstant *inst, int *count)
Return the singleton array of instants of a temporal instant.
Definition: tinstant.c:391
const TSequence ** tsequenceset_sequences_p(const TSequenceSet *ss)
Return an array of pointers to the sequences of a temporal sequence set.
Definition: tsequenceset.c:990
Datum * tinstant_values_p(const TInstant *inst, int *count)
Return the singleton (pointer to the) base value of a temporal instant.
Definition: tinstant.c:309
double tnumberseq_integral(const TSequence *seq)
Return the integral (area under the curve) of a temporal sequence number.
Definition: tsequence.c:2835
void tnumber_set_span(const Temporal *temp, Span *span)
Return in the last argument the value span of a temporal number.
Definition: temporal.c:1117
TSequence ** tsequence_segments(const TSequence *seq, int *count)
Return the array of segments of a temporal sequence.
Definition: tsequence.c:2102
void tsequence_set_tstzspan(const TSequence *seq, Span *s)
Return in the last argument the time span of a temporal sequence.
Definition: tsequence.c:2013
TSequence ** tsequenceset_segments(const TSequenceSet *ss, int *count)
Return the array of segments of a temporal sequence set.
Definition: tsequenceset.c:1007
const TInstant * tsequence_min_inst(const TSequence *seq)
Return a pointer to the instant with minimum base value of a temporal sequence.
Definition: tsequence.c:1914
TimestampTz tsequenceset_end_timestamptz(const TSequenceSet *ss)
Return the end timestamptz of a temporal sequence set.
Definition: tsequenceset.c:1136
SpanSet * tnumberinst_valuespans(const TInstant *inst)
Return the base values of a temporal instant number as a span set.
Definition: tinstant.c:325
void tinstant_set_tstzspan(const TInstant *inst, Span *s)
Return in the last argument the time span of a temporal instant.
Definition: tinstant.c:356
TimestampTz tsequence_start_timestamptz(const TSequence *seq)
Return the start timestamptz of a temporal sequence.
Definition: tsequence.c:2148
Datum * temporal_values(const Temporal *temp, int *count)
Return the array of copies of the distinct base values of a temporal value.
Definition: temporal.c:1879
int tsequenceset_num_timestamps(const TSequenceSet *ss)
Return the number of distinct timestamptz values of a temporal sequence set.
Definition: tsequenceset.c:1151
SpanSet * tnumberseq_valuespans(const TSequence *seq)
Return the base values of a temporal number sequence as a span set.
Definition: tsequence.c:1826
Datum temporal_max_value(const Temporal *temp)
Return a copy of the maximum base value of a temporal value.
Definition: temporal.c:2025
Interval * tsequence_duration(const TSequence *seq)
Return the duration of a temporal sequence.
Definition: tsequence.c:2000
Datum * temporal_values_p(const Temporal *temp, int *count)
Return the array of pointers to the base values of a temporal value.
Definition: temporal.c:1854
const TInstant * tsequence_max_inst(const TSequence *seq)
Return a pointer to the instant with minimum base value of a temporal sequence.
Definition: tsequence.c:1929
void temporal_set_tstzspan(const Temporal *temp, Span *s)
Return in the last argument the time span of a temporal value.
Definition: temporal.c:1074
double tnumberseqset_integral(const TSequenceSet *ss)
Return the integral (area under the curve) of a temporal number.
Definition: tsequenceset.c:2044
bool tsequence_value_at_timestamptz(const TSequence *seq, TimestampTz t, bool strict, Datum *result)
Return in the last argument a copy of the value of a temporal sequence at a timestamptz.
Definition: tsequence.c:2246
bool tsequenceset_value_n(const TSequenceSet *ss, int n, Datum *result)
Return in the last argument a copy of the n-th value of a temporal sequence set.
Definition: tsequenceset.c:878
Datum tinstant_value(const TInstant *inst)
Return a copy of the base value of a temporal instant.
Definition: tinstant.c:85
SpanSet * tnumberseqset_valuespans(const TSequenceSet *ss)
Return the base values of a temporal number sequence set as a number span set.
Definition: tsequenceset.c:713
const TInstant * temporal_end_inst(const Temporal *temp)
Return a pointer to the end instant of a temporal value.
Definition: temporal.c:2488
uint32 tinstant_hash(const TInstant *inst)
Return the 32-bit hash value of a temporal instant.
Definition: tinstant.c:597
TimestampTz * tsequence_timestamps(const TSequence *seq, int *count)
Return the array of timestamps of a temporal sequence.
Definition: tsequence.c:2193
const TInstant * temporal_inst_n(const Temporal *temp, int n)
Return a pointer to the n-th instant of a temporal value.
Definition: temporal.c:2534
void tsequenceset_set_tstzspan(const TSequenceSet *ss, Span *s)
Return in the last argument the time span of a temporal sequence set.
Definition: tsequenceset.c:976
SpanSet * tinstant_time(const TInstant *inst)
Return the time frame of a temporal instant as a span set.
Definition: tinstant.c:343
const TSequence ** temporal_sequences_p(const Temporal *temp, int *count)
Return an array of pointers to the sequences of a temporal sequence (set)
Definition: temporal.c:2298
double tnumberseq_twavg(const TSequence *seq)
Return the time-weighted average of a temporal sequence number.
Definition: tsequence.c:2910
Datum temporal_start_value(const Temporal *temp)
Return a copy of the start base value of a temporal value.
Definition: temporal.c:1951
bool tsequenceset_timestamptz_n(const TSequenceSet *ss, int n, TimestampTz *result)
Return in the last argument the n-th distinct timestamptz of a temporal sequence set.
Definition: tsequenceset.c:1182
Datum temporal_min_value(const Temporal *temp)
Return a copy of the minimum base value of a temporal value.
Definition: temporal.c:1997
const TSequence ** tsequence_seqs(const TSequence *seq, int *count)
Return a singleton array of pointers to the sequence of a temporal sequence.
Definition: tsequence.c:2029
const TInstant * tsequenceset_max_inst(const TSequenceSet *ss)
Return a pointer to the instant with maximum base value of a temporal sequence set.
Definition: tsequenceset.c:802
Datum tsequenceset_min_val(const TSequenceSet *ss)
Return (a pointer to) the minimum base value of a temporal sequence set.
Definition: tsequenceset.c:815
const TInstant * tsequenceset_min_inst(const TSequenceSet *ss)
Return a pointer to the instant with minimum base value of a temporal sequence set.
Definition: tsequenceset.c:787
Interval * tsequenceset_duration(const TSequenceSet *ss, bool boundspan)
Return the duration of a temporal sequence set.
Definition: tsequenceset.c:944
Datum tsequenceset_max_val(const TSequenceSet *ss)
Return (a pointer to) the maximum base value of a temporal sequence set.
Definition: tsequenceset.c:843
SpanSet * tsequenceset_time(const TSequenceSet *ss)
Return the time frame a temporal sequence set as a timestamptz span set.
Definition: tsequenceset.c:927
uint32 tsequence_hash(const TSequence *seq)
Return the 32-bit hash value of a temporal sequence.
Definition: tsequence.c:3007
Datum * tsequence_values_p(const TSequence *seq, int *count)
Return the array of (pointer to the) distinct values of a temporal sequence.
Definition: tsequence.c:1799
const TInstant ** temporal_instants_p(const Temporal *temp, int *count)
Return an array of pointers to the distinct instants of a temporal value.
Definition: temporal.c:2581
bool tsequenceset_value_at_timestamptz(const TSequenceSet *ss, TimestampTz t, bool strict, Datum *result)
Return in the last argument a copy of the value of a temporal sequence set at a timestamptz.
Definition: tsequenceset.c:1263
bool tinstant_value_at_timestamptz(const TInstant *inst, TimestampTz t, Datum *result)
Return in the last argument a copy of the the value of a temporal instant at a timestamptz.
Definition: tinstant.c:412
TimestampTz tsequenceset_start_timestamptz(const TSequenceSet *ss)
Return the start timestamptz of a temporal sequence set.
Definition: tsequenceset.c:1122
const TInstant ** tsequenceset_insts_p(const TSequenceSet *ss)
Return an array of pointers to the instants of a temporal sequence set.
Definition: tsequenceset.c:1101
const TInstant * temporal_start_inst(const Temporal *temp)
Return a pointer to the start instant of a temporal value.
Definition: temporal.c:2448
TimestampTz * tsequenceset_timestamps(const TSequenceSet *ss, int *count)
Return the array of distinct timestamps of a temporal sequence set.
Definition: tsequenceset.c:1233
const TInstant ** tsequence_insts_p(const TSequence *seq)
Return the array of pointers to distinct instants of a temporal sequence.
Definition: tsequence.c:2132
Datum * tsequenceset_values_p(const TSequenceSet *ss, int *count)
Return the array of (pointers to the) distinct values of a temporal sequence set.
Definition: tsequenceset.c:684
size_t temporal_mem_size(const Temporal *temp)
Return the size in bytes of a temporal value.
Definition: temporal.c:1780
void temporal_set_bbox(const Temporal *temp, void *box)
Return in the last argument the bounding box of a temporal value.
Definition: temporal.c:1827
Datum temporal_end_value(const Temporal *temp)
Return a copy of the end base value of a temporal value.
Definition: temporal.c:1972
bool temporal_value_at_timestamptz(const Temporal *temp, TimestampTz t, bool strict, Datum *result)
Return in the last argument a copy of the value of a temporal value at a timestamptz.
Definition: temporal_restrict.c:459
TimestampTz * tinstant_timestamps(const TInstant *inst, int *count)
Return the singleton array of timestamps of a temporal instant.
Definition: tinstant.c:373
bool temporal_value_n(const Temporal *temp, int n, Datum *result)
Return in the last argument a copy of the n-th value of a temporal value.
Definition: temporal.c:2057
SpanSet * tsequence_time(const TSequence *seq)
Return the time frame of a temporal sequence as a span set.
Definition: tsequence.c:1857
uint32 tsequenceset_hash(const TSequenceSet *ss)
Return the 32-bit hash value of a temporal sequence set.
Definition: tsequenceset.c:2180
Datum tsequence_max_val(const TSequence *seq)
Return (a pointer to) the maximum base value of a temporal sequence.
Definition: tsequence.c:1968
Temporal * temporal_app_tseq_transfn(Temporal *state, const TSequence *seq)
Transition function for append temporal sequence aggregate.
Definition: temporal_aggfuncs.c:1338
Temporal * temporal_app_tinst_transfn(Temporal *state, const TInstant *inst, interpType interp, double maxdist, const Interval *maxt)
Transition function for append temporal instant aggregate.
Definition: temporal_aggfuncs.c:1306
void skiplist_free(SkipList *list)
Delete the skiplist and free its allocated memory.
Definition: skiplist.c:219
void tsequenceset_set_bbox(const TSequenceSet *ss, void *box)
Return in the last argument the bounding box of a temporal sequence set.
Definition: temporal_boxops.c:282
void tinstant_set_bbox(const TInstant *inst, void *box)
Return in the last argument the bounding box of a temporal instant.
Definition: temporal_boxops.c:212
void tsequence_expand_bbox(TSequence *seq, const TInstant *inst)
Expand the bounding box of a temporal sequence with an additional instant.
Definition: temporal_boxops.c:442
void tnumberseq_set_tbox(const TSequence *seq, TBox *box)
Return int the last argument the temporal box of a temporal number sequence.
Definition: temporal_boxops.c:237
void tnumberseqset_set_tbox(const TSequenceSet *ss, TBox *box)
Return in the last argument the temporal box of a temporal number sequence.
Definition: temporal_boxops.c:267
void tnumberinst_set_tbox(const TInstant *inst, TBox *box)
Return in the last argument the temporal box of a temporal number instant.
Definition: temporal_boxops.c:188
void tsequence_set_bbox(const TSequence *seq, void *box)
Return in the last argument the bounding box of a temporal sequence.
Definition: temporal_boxops.c:251
void tnumber_set_tbox(const Temporal *temp, TBox *box)
Return in the last argument the temporal box of a temporal number.
Definition: temporal_boxops.c:297
void tsequenceset_expand_bbox(TSequenceSet *ss, const TSequence *seq)
Expand the bounding box of a temporal sequence set with an additional sequence.
Definition: temporal_boxops.c:468
int always_ne_base_temporal(Datum value, const Temporal *temp)
Return true if a temporal value is always different from a base value.
Definition: temporal_compops.c:414
int always_gt_base_temporal(Datum value, const Temporal *temp)
Return true if a temporal value is always greater than a base value.
Definition: temporal_compops.c:454
int ever_ge_base_temporal(Datum value, const Temporal *temp)
Return true if a temporal value is ever greater than or equal to a base value.
Definition: temporal_compops.c:304
int ever_le_base_temporal(Datum value, const Temporal *temp)
Return true if a temporal value is ever less than or equal to a base value.
Definition: temporal_compops.c:277
int ever_le_temporal_base(const Temporal *temp, Datum value)
Return true if a temporal value is ever less than or equal to a base value.
Definition: temporal_compops.c:195
int always_ge_base_temporal(Datum value, const Temporal *temp)
Return true if a temporal value is always greater than or equal to a base value.
Definition: temporal_compops.c:468
int always_ge_temporal_base(const Temporal *temp, Datum value)
Return true if a temporal value is always greater than or equal to a base value.
Definition: temporal_compops.c:386
int ever_ne_temporal_base(const Temporal *temp, Datum value)
Return true if a temporal value is ever different from a base value.
Definition: temporal_compops.c:168
int always_le_temporal_base(const Temporal *temp, Datum value)
Return true if a temporal value is always less than or equal to a base value.
Definition: temporal_compops.c:359
int always_gt_temporal_base(const Temporal *temp, Datum value)
Return true if a temporal value is always greater than a base value.
Definition: temporal_compops.c:372
int always_ne_temporal_base(const Temporal *temp, Datum value)
Return true if a temporal value is always different from a base value.
Definition: temporal_compops.c:332
int ever_ne_base_temporal(Datum value, const Temporal *temp)
Return true if a temporal value is ever different from a base value.
Definition: temporal_compops.c:250
int ever_lt_base_temporal(Datum value, const Temporal *temp)
Return true if a temporal value is ever less than a base value.
Definition: temporal_compops.c:263
int ever_gt_base_temporal(Datum value, const Temporal *temp)
Return true if a temporal value is ever greater than a base value.
Definition: temporal_compops.c:290
int ever_gt_temporal_base(const Temporal *temp, Datum value)
Return true if a temporal value is ever greater than a base value.
Definition: temporal_compops.c:208
int always_eq_base_temporal(Datum value, const Temporal *temp)
Return true if a temporal value is always equal to a base value.
Definition: temporal_compops.c:401
int ever_eq_temporal_base(const Temporal *temp, Datum value)
Return true if a temporal value is ever equal to a base value.
Definition: temporal_compops.c:155
int always_lt_temporal_base(const Temporal *temp, Datum value)
Return true if a temporal value is always less than a base value.
Definition: temporal_compops.c:345
int ever_eq_base_temporal(Datum value, const Temporal *temp)
Return true if a temporal value is ever equal to a base value.
Definition: temporal_compops.c:237
int ever_lt_temporal_base(const Temporal *temp, Datum value)
Return true if a temporal value is ever less than a base value.
Definition: temporal_compops.c:181
int always_lt_base_temporal(Datum value, const Temporal *temp)
Return true if a temporal value is always less than a base value.
Definition: temporal_compops.c:427
int always_le_base_temporal(Datum value, const Temporal *temp)
Return true if a temporal value is always less than or equal to a base value.
Definition: temporal_compops.c:441
int always_eq_temporal_base(const Temporal *temp, Datum value)
Return true if a temporal value is always equal to a base value.
Definition: temporal_compops.c:319
int ever_ge_temporal_base(const Temporal *temp, Datum value)
Return true if a temporal value is ever greater than or equal to a base value.
Definition: temporal_compops.c:222
bool tinstant_eq(const TInstant *inst1, const TInstant *inst2)
Return true if two temporal instants are equal.
Definition: tinstant.c:540
int tsequence_cmp(const TSequence *seq1, const TSequence *seq2)
Return -1, 0, or 1 depending on whether the first temporal sequence is less than, equal,...
Definition: tsequence.c:2965
int tsequenceset_cmp(const TSequenceSet *ss1, const TSequenceSet *ss2)
Return -1, 0, or 1 depending on whether the first temporal sequence set is less than,...
Definition: tsequenceset.c:2143
bool tsequenceset_eq(const TSequenceSet *ss1, const TSequenceSet *ss2)
Return true if two temporal sequence sets are equal.
Definition: tsequenceset.c:2110
bool tsequence_eq(const TSequence *seq1, const TSequence *seq2)
Return true if two temporal sequences are equal.
Definition: tsequence.c:2930
int tinstant_cmp(const TInstant *inst1, const TInstant *inst2)
Return -1, 0, or 1 depending on whether the first temporal instant is less than, equal,...
Definition: tinstant.c:564
TSequenceSet * tsequenceset_make_free(TSequence **sequences, int count, bool normalize)
Return a temporal sequence set from an array of temporal sequences and free the array and the sequenc...
Definition: tsequenceset.c:424
TSequenceSet * tsequenceset_make_exp(const TSequence **sequences, int count, int maxcount, bool normalize)
Return a temporal sequence set from an array of temporal sequences.
Definition: tsequenceset.c:313
TSequenceSet * tsequenceset_copy(const TSequenceSet *ss)
Return a copy of a temporal sequence set.
Definition: tsequenceset.c:608
TSequence * tsequence_from_base_tstzspan(Datum value, meosType temptype, const Span *s, interpType interp)
Return a temporal sequence from a base value and a timestamptz span.
Definition: tsequence.c:1311
TInstant * tinstant_copy(const TInstant *inst)
Return a copy of a temporal instant.
Definition: tinstant.c:288
TSequenceSet * tsequenceset_from_base_tstzspanset(Datum value, meosType temptype, const SpanSet *ss, interpType interp)
Return a temporal sequence set from a base value and a span set.
Definition: tsequenceset.c:659
TSequence * tsequence_from_base_tstzset(Datum value, meosType temptype, const Set *s)
Return a temporal discrete sequence from a base value and a timestamptz set.
Definition: tsequence.c:1289
TSequence * tsequence_copy(const TSequence *seq)
Return a copy of a temporal sequence.
Definition: tsequence.c:1268
Temporal * temporal_from_base_temp(Datum value, meosType temptype, const Temporal *temp)
Return a temporal value from a base value and the time frame of another temporal value.
Definition: temporal.c:943
TSequence * tsequence_make_exp(const TInstant **instants, int count, int maxcount, bool lower_inc, bool upper_inc, interpType interp, bool normalize)
Return a temporal sequence from an array of temporal instants enabling the data structure to expand.
Definition: tsequence.c:1146
TInstant * tinstant_make(Datum value, meosType temptype, TimestampTz t)
Return a temporal instant from the arguments.
Definition: tinstant.c:203
TSequence * tsequence_make_free(TInstant **instants, int count, bool lower_inc, bool upper_inc, interpType interp, bool normalize)
Return a temporal sequence from an array of temporal instants and free the array and the instants aft...
Definition: tsequence.c:1218
Temporal * distance_tnumber_number(const Temporal *temp, Datum value)
Return the temporal distance between a temporal number and a number.
Definition: tnumber_distance.c:179
double nad_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2)
Return the nearest approach distance between two temporal numbers.
Definition: tnumber_distance.c:341
double nad_tnumber_tbox(const Temporal *temp, const TBox *box)
Return the nearest approach distance between a temporal number and a temporal box.
Definition: tnumber_distance.c:299
double nad_tbox_tbox(const TBox *box1, const TBox *box2)
Return the nearest approach distance between the temporal boxes.
Definition: tnumber_distance.c:270
double nad_tnumber_number(const Temporal *temp, Datum value)
Return the nearest approach distance between a temporal number and a number.
Definition: tnumber_distance.c:245
TSequence * tsequence_from_mfjson(json_object *mfjson, bool spatial, int32_t srid, meosType temptype, interpType interp)
Return a temporal sequence from its MF-JSON representation.
Definition: type_in.c:855
Temporal * temporal_in(const char *str, meosType temptype)
Return a temporal value from its Well-Known Text (WKT) representation.
Definition: temporal.c:805
TSequenceSet * tintseqset_from_mfjson(json_object *mfjson)
Return a temporal integer sequence set from its MF-JSON representation.
Definition: type_in_meos.c:176
TSequenceSet * tboolseqset_from_mfjson(json_object *mfjson)
Return a temporal boolean sequence set from its MF-JSON representation.
Definition: type_in_meos.c:163
TInstant * ttextinst_from_mfjson(json_object *mfjson)
Return a temporal text instant from its MF-JSON representation.
Definition: type_in_meos.c:97
TSequence * tfloatseq_in(const char *str, interpType interp)
Return a temporal float sequence from its Well-Known Text (WKT) representation.
Definition: tsequence_meos.c:99
char * tsequenceset_out(const TSequenceSet *ss, int maxdd)
Return the Well-Known Text (WKT) representation of a temporal sequence set.
Definition: tsequenceset.c:2028
TInstant * tintinst_in(const char *str)
Return a temporal integer instant from its Well-Known Text (WKT) representation.
Definition: tinstant_meos.c:78
TInstant * tintinst_from_mfjson(json_object *mfjson)
Return a temporal integer instant from its MF-JSON representation.
Definition: type_in_meos.c:73
TSequence * ttextseq_from_mfjson(json_object *mfjson)
Return a temporal text sequence from its MF-JSON representation.
Definition: type_in_meos.c:148
TSequenceSet * tfloatseqset_in(const char *str)
Return a temporal float sequence set from its Well-Known Text (WKT) representation.
Definition: tsequenceset_meos.c:164
TSequenceSet * tsequenceset_in(const char *str, meosType temptype, interpType interp)
Return a temporal sequence set from its Well-Known Text (WKT) representation.
Definition: tsequenceset.c:1983
TSequenceSet * tboolseqset_in(const char *str)
Return a temporal boolean sequence set from its Well-Known Text (WKT) representation.
Definition: tsequenceset_meos.c:138
TSequenceSet * ttextseqset_from_mfjson(json_object *mfjson)
Return a temporal text sequence set from its MF-JSON representation.
Definition: type_in_meos.c:201
TInstant * tinstant_from_mfjson(json_object *mfjson, bool spatial, int32_t srid, meosType temptype)
Return a temporal instant from its MF-JSON representation.
Definition: type_in.c:751
TSequence * tboolseq_in(const char *str, interpType interp)
Return a temporal boolean sequence from its Well-Known Text (WKT) representation.
Definition: tsequence_meos.c:73
TSequenceSet * tintseqset_in(const char *str)
Return a temporal integer sequence set from its Well-Known Text (WKT) representation.
Definition: tsequenceset_meos.c:151
TSequence * tfloatseq_from_mfjson(json_object *mfjson, interpType interp)
Return a temporal float sequence from its MF-JSON representation.
Definition: type_in_meos.c:136
TSequence * tintseq_from_mfjson(json_object *mfjson)
Return a temporal integer sequence from its MF-JSON representation.
Definition: type_in_meos.c:123
char ** temparr_out(const Temporal **temparr, int count, int maxdd)
Return the Well-Known Text (WKT) representation of an array of temporal values.
Definition: temporal.c:849
Temporal * temporal_from_mfjson(const char *mfjson, meosType temptype)
Return a temporal object from its MF-JSON representation.
Definition: type_in.c:975
TInstant * tboolinst_from_mfjson(json_object *mfjson)
Return a temporal boolean instant from its MF-JSON representation.
Definition: type_in_meos.c:61
TSequence * ttextseq_in(const char *str, interpType interp)
Return a temporal text sequence from its Well-Known Text (WKT) representation.
Definition: tsequence_meos.c:112
TInstant * tfloatinst_from_mfjson(json_object *mfjson)
Return a temporal float instant from its MF-JSON representation.
Definition: type_in_meos.c:85
char * tsequence_out(const TSequence *seq, int maxdd)
Return the Well-Known Text (WKT) representation of a temporal sequence.
Definition: tsequence.c:835
char * tinstant_out(const TInstant *inst, int maxdd)
Return the Well-Known Text (WKT) representation of a temporal instant.
Definition: tinstant.c:175
TSequenceSet * tsequenceset_from_mfjson(json_object *mfjson, bool spatial, int32_t srid, meosType temptype, interpType interp)
Return a temporal sequence set from its MF-JSON representation.
Definition: type_in.c:903
TSequence * tsequence_in(const char *str, meosType temptype, interpType interp)
Return a temporal sequence from its Well-Known Text (WKT) representation.
Definition: tsequence.c:767
char * temporal_out(const Temporal *temp, int maxdd)
Return the Well-Known Text (WKT) representation of a temporal value.
Definition: temporal.c:819
TSequenceSet * ttextseqset_in(const char *str)
Return a temporal text sequence set from its Well-Known Text (WKT) representation.
Definition: tsequenceset_meos.c:180
TInstant * ttextinst_in(const char *str)
Return a temporal text instant from its Well-Known Text (WKT) representation.
Definition: tinstant_meos.c:102
TSequence * tboolseq_from_mfjson(json_object *mfjson)
Return a temporal boolean sequence from its MF-JSON representation.
Definition: type_in_meos.c:111
TInstant * tboolinst_in(const char *str)
Return a temporal boolean instant from its Well-Known Text (WKT) representation.
Definition: tinstant_meos.c:66
TInstant * tfloatinst_in(const char *str)
Return a temporal float instant from its Well-Known Text (WKT) representation.
Definition: tinstant_meos.c:90
TSequence * tintseq_in(const char *str, interpType interp)
Return a temporal integer sequence from its Well-Known Text (WKT) representation.
Definition: tsequence_meos.c:86
TSequenceSet * tfloatseqset_from_mfjson(json_object *mfjson, interpType interp)
Return a temporal float sequence set from its MF-JSON representation.
Definition: type_in_meos.c:189
TInstant * tinstant_in(const char *str, meosType temptype)
Return a temporal instant from its Well-Known Text (WKT) representation.
Definition: tinstant.c:137
TSequenceSet * tfloatseqset_derivative(const TSequenceSet *ss)
Return the derivative of a temporal float sequence set.
Definition: tnumber_mathfuncs.c:636
TSequenceSet * tnumberseqset_abs(const TSequenceSet *ss)
Return the absolute value of a temporal number sequence set.
Definition: tnumber_mathfuncs.c:322
TSequence * tnumberseq_angular_difference(const TSequence *seq)
Return the temporal angular difference of a temporal number sequence.
Definition: tnumber_mathfuncs.c:519
TSequence * tnumberseq_abs(const TSequence *seq)
Return the absolute value of a temporal number sequence.
Definition: tnumber_mathfuncs.c:308
TSequenceSet * tnumberseqset_delta_value(const TSequenceSet *ss)
Return the delta value of a temporal number sequence set.
Definition: tnumber_mathfuncs.c:418
TInstant * tnumberinst_abs(const TInstant *inst)
Return the absolute value of a temporal number instant.
Definition: tnumber_mathfuncs.c:222
TSequence * tfloatseq_derivative(const TSequence *seq)
Return the derivative of a temporal float sequence.
Definition: tnumber_mathfuncs.c:593
TSequence * tnumberseq_delta_value(const TSequence *seq)
Return the delta value of a temporal number sequence.
Definition: tnumber_mathfuncs.c:382
TSequence * tnumberseqset_angular_difference(const TSequenceSet *ss)
Return the angular difference of a temporal number sequence set.
Definition: tnumber_mathfuncs.c:540
Temporal * tsequence_merge_array(const TSequence **sequences, int count)
Merge an array of temporal sequences.
Definition: temporal_modif.c:424
Temporal * tsequence_merge(const TSequence *seq1, const TSequence *seq2)
Merge two temporal sequences.
Definition: temporal_modif.c:241
TSequenceSet * tsequenceset_append_tsequence(TSequenceSet *ss, const TSequence *seq, bool expand)
Append a sequence to a temporal sequence set.
Definition: temporal_modif.c:2098
TSequenceSet * tsequenceset_merge(const TSequenceSet *ss1, const TSequenceSet *ss2)
Merge two temporal sequence sets.
Definition: temporal_modif.c:458
TSequenceSet * tsequenceset_delete_tstzspan(const TSequenceSet *ss, const Span *s)
Delete a timestamptz span from a temporal sequence set.
Definition: temporal_modif.c:1410
TSequenceSet * tsequenceset_merge_array(const TSequenceSet **seqsets, int count)
Merge an array of temporal sequence sets.
Definition: temporal_modif.c:475
Temporal * tsequence_delete_tstzspanset(const TSequence *seq, const SpanSet *ss, bool connect)
Delete a timestamptz span set from a temporal value.
Definition: temporal_modif.c:1135
TSequenceSet * tsequenceset_delete_tstzspanset(const TSequenceSet *ss, const SpanSet *ps)
Delete a timestamptz span from a temporal sequence set.
Definition: temporal_modif.c:1427
Temporal * tsequence_append_tsequence(const TSequence *seq1, const TSequence *seq2, bool expand)
Append a sequence to a temporal sequence.
Definition: temporal_modif.c:1912
Temporal * tinstant_merge_array(const TInstant **instants, int count)
Merge an array of temporal instants.
Definition: temporal_modif.c:202
Temporal * tsequence_delete_timestamptz(const TSequence *seq, TimestampTz t, bool connect)
Delete a timestamptz from a temporal value.
Definition: temporal_modif.c:885
TSequenceSet * tsequenceset_delete_timestamptz(const TSequenceSet *ss, TimestampTz t)
Delete a timestamptz from a temporal sequence set.
Definition: temporal_modif.c:1326
Temporal * tsequence_delete_tstzset(const TSequence *seq, const Set *s, bool connect)
Delete a timestamptz set from a temporal value.
Definition: temporal_modif.c:993
Temporal * tinstant_merge(const TInstant *inst1, const TInstant *inst2)
Merge two temporal instants.
Definition: temporal_modif.c:76
Temporal * tsequence_delete_tstzspan(const TSequence *seq, const Span *s, bool connect)
Delete a timestamptz span from a temporal sequence.
Definition: temporal_modif.c:1060
Temporal * tsequence_insert(const TSequence *seq1, const TSequence *seq2, bool connect)
Insert the second temporal value into the first one.
Definition: temporal_modif.c:812
TSequenceSet * tsequenceset_append_tinstant(TSequenceSet *ss, const TInstant *inst, double maxdist, const Interval *maxt, bool expand)
Append an instant to a temporal sequence set.
Definition: temporal_modif.c:1997
TSequenceSet * tsequenceset_delete_tstzset(const TSequenceSet *ss, const Set *s)
Delete a timestamptz span from a temporal sequence set.
Definition: temporal_modif.c:1365
Temporal * tsequence_append_tinstant(TSequence *seq, const TInstant *inst, double maxdist, const Interval *maxt, bool expand)
Append an instant to a temporal sequence accounting for potential gaps.
Definition: temporal_modif.c:1727
TSequenceSet * tsequenceset_insert(const TSequenceSet *ss1, const TSequenceSet *ss2)
Insert the second temporal value into the first one.
Definition: temporal_modif.c:1155
TInstant * tinstant_restrict_tstzset(const TInstant *inst, const Set *s, bool atfunc)
Restrict a temporal instant to (the complement of) a timestamptz set.
Definition: temporal_restrict.c:833
TSequenceSet * tsequenceset_restrict_value(const TSequenceSet *ss, Datum value, bool atfunc)
Restrict a temporal sequence set to (the complement of) a base value.
Definition: temporal_restrict.c:2855
TInstant * tnumberinst_restrict_span(const TInstant *inst, const Span *span, bool atfunc)
Restrict a temporal number instant to (the complement of) a span of base values.
Definition: temporal_restrict.c:744
Temporal * tsequenceset_restrict_timestamptz(const TSequenceSet *ss, TimestampTz t, bool atfunc)
Restrict a temporal sequence set to (the complement of) a timestamptz.
Definition: temporal_restrict.c:3019
Temporal * temporal_restrict_tstzspan(const Temporal *temp, const Span *s, bool atfunc)
Restrict a temporal value to (the complement of) a timestamptz span.
Definition: temporal_restrict.c:525
Temporal * temporal_restrict_tstzset(const Temporal *temp, const Set *s, bool atfunc)
Restrict a temporal value to (the complement of) a timestamp set.
Definition: temporal_restrict.c:489
TSequenceSet * tsequenceset_restrict_tstzspan(const TSequenceSet *ss, const Span *s, bool atfunc)
Restrict a temporal sequence set to (the complement of) a timestamptz span.
Definition: temporal_restrict.c:3163
TSequenceSet * tnumberseqset_restrict_spanset(const TSequenceSet *ss, const SpanSet *spanset, bool atfunc)
Restrict a temporal number to (the complement of) an array of spans of base values.
Definition: temporal_restrict.c:2969
Temporal * temporal_restrict_value(const Temporal *temp, Datum value, bool atfunc)
Restrict a temporal value to (the complement of) a base value.
Definition: temporal_restrict.c:152
TSequenceSet * tnumberseqset_restrict_span(const TSequenceSet *ss, const Span *span, bool atfunc)
Restrict a temporal number to a span of base values.
Definition: temporal_restrict.c:2937
Temporal * tnumber_restrict_span(const Temporal *temp, const Span *span, bool atfunc)
Restrict a temporal value to (the complement of) a span of base values.
Definition: temporal_restrict.c:294
TInstant * tinstant_restrict_value(const TInstant *inst, Datum value, bool atfunc)
Restrict a temporal instant to (the complement of) a base value.
Definition: temporal_restrict.c:664
TInstant * tnumberinst_restrict_spanset(const TInstant *inst, const SpanSet *ss, bool atfunc)
Restrict a temporal number instant to (the complement of) a span set.
Definition: temporal_restrict.c:780
Temporal * temporal_restrict_values(const Temporal *temp, const Set *set, bool atfunc)
Restrict a temporal value to (the complement of) a set of base values.
Definition: temporal_restrict.c:242
TInstant * tinstant_restrict_tstzspanset(const TInstant *inst, const SpanSet *ss, bool atfunc)
Restrict a temporal instant to (the complement of) a span set.
Definition: temporal_restrict.c:884
TSequenceSet * tsequenceset_restrict_values(const TSequenceSet *ss, const Set *s, bool atfunc)
Restrict a temporal sequence set to (the complement of) an array of base values.
Definition: temporal_restrict.c:2886
Temporal * temporal_restrict_minmax(const Temporal *temp, bool min, bool atfunc)
Restrict a temporal value to (the complement of) a minimum base value.
Definition: temporal_restrict.c:390
TInstant * tinstant_restrict_timestamptz(const TInstant *inst, TimestampTz t, bool atfunc)
Restrict a temporal instant to (the complement of) a timestamptz.
Definition: temporal_restrict.c:800
Temporal * temporal_restrict_tstzspanset(const Temporal *temp, const SpanSet *ss, bool atfunc)
Restrict a temporal value to (the complement of) a span set.
Definition: temporal_restrict.c:552
TSequenceSet * tsequenceset_restrict_tstzspanset(const TSequenceSet *ss, const SpanSet *ps, bool atfunc)
Restrict a temporal sequence set to (the complement of) a timestamptz span set.
Definition: temporal_restrict.c:3252
TInstant * tinstant_restrict_values(const TInstant *inst, const Set *set, bool atfunc)
Restrict a temporal instant to a set of base values.
Definition: temporal_restrict.c:708
TInstant * tsequence_at_timestamptz(const TSequence *seq, TimestampTz t)
Restrict a temporal sequence to a timestamptz.
Definition: temporal_restrict.c:2216
TSequenceSet * tcontseq_restrict_minmax(const TSequence *seq, bool min, bool atfunc)
Restrict a temporal continuous sequence to (the complement of) its minimum/maximum base value.
Definition: temporal_restrict.c:1901
TSequence * tdiscseq_restrict_minmax(const TSequence *seq, bool min, bool atfunc)
Restrict a temporal discrete sequence to (the complement of) its minimum/maximum base value.
Definition: temporal_restrict.c:1882
Temporal * tsequence_restrict_tstzspan(const TSequence *seq, const Span *s, bool atfunc)
Restrict a temporal value to (the complement of) a timestamptz span.
Definition: temporal_restrict.c:2683
Temporal * tsequence_restrict_tstzspanset(const TSequence *seq, const SpanSet *ss, bool atfunc)
Restrict a temporal sequence to (the complement of) a timestamptz span set.
Definition: temporal_restrict.c:2832
TSequenceSet * tsequenceset_restrict_minmax(const TSequenceSet *ss, bool min, bool atfunc)
Restrict a temporal sequence set to (the complement of) its minimum/maximum base value.
Definition: temporal_restrict.c:3003
Temporal * tnumber_restrict_spanset(const Temporal *temp, const SpanSet *ss, bool atfunc)
Restrict a temporal value to (the complement of) a span set.
Definition: temporal_restrict.c:339
Temporal * tsequenceset_restrict_tstzset(const TSequenceSet *ss, const Set *s, bool atfunc)
Restrict a temporal sequence set to (the complement of) a timestamptz set.
Definition: temporal_restrict.c:3078
Temporal * temporal_restrict_timestamptz(const Temporal *temp, TimestampTz t, bool atfunc)
Restrict a temporal value to a timestamp.
Definition: temporal_restrict.c:419
bool temporal_bbox_restrict_set(const Temporal *temp, const Set *set)
Return true if the bounding boxes of a temporal value and a set overlap.
Definition: temporal_restrict.c:212
TInstant * tinstant_restrict_tstzspan(const TInstant *inst, const Span *period, bool atfunc)
Restrict a temporal instant to (the complement of) a timestamptz span.
Definition: temporal_restrict.c:850
TSequenceSet * tsequenceset_shift_scale_time(const TSequenceSet *ss, const Interval *start, const Interval *duration)
Return a temporal sequence set shifted and/or scaled by two intervals.
Definition: tsequenceset.c:1711
TSequenceSet * tsequenceset_to_linear(const TSequenceSet *ss)
Return a temporal sequence set with continuous base type from step to linear interpolation.
Definition: tsequenceset.c:1616
TSequence * tsequence_shift_scale_time(const TSequence *seq, const Interval *shift, const Interval *duration)
Return a temporal sequence shifted and/or scaled by two intervals.
Definition: tsequence.c:1767
TSequence * temporal_tsequence(const Temporal *temp, interpType interp)
Return a temporal value transformed to a temporal sequence.
Definition: temporal.c:1513
Temporal * temporal_compact(const Temporal *temp)
Return a copy of a temporal value without any extra storage space.
Definition: temporal.c:1441
TSequenceSet * temporal_tsequenceset(const Temporal *temp, interpType interp)
Return a temporal value transformed to a temporal sequence set.
Definition: temporal.c:1579
TInstant * tsequence_to_tinstant(const TSequence *seq)
Return a temporal sequence transformed into a temporal instant.
Definition: tinstant.c:433
TSequence * tinstant_to_tsequence_free(TInstant *inst, interpType interp)
Return a temporal instant transformed into a temporal sequence.
Definition: tsequence.c:1461
TSequence * tsequenceset_to_discrete(const TSequenceSet *ss)
Return a temporal sequence set transformed into a temporal discrete sequence.
Definition: tsequenceset.c:1545
void temporal_restart(Temporal *temp, int count)
Return a temporal sequence (set) that keepsg only the last n instants or sequences.
Definition: temporal.c:1465
TSequence * tinstant_to_tsequence(const TInstant *inst, interpType interp)
Return a temporal instant transformed into a temporal sequence.
Definition: tsequence.c:1447
void tsequence_restart(TSequence *seq, int count)
Return a temporal sequence restarted by keeping only the last n instants.
Definition: tsequence.c:1381
Temporal * tsequence_set_interp(const TSequence *seq, interpType interp)
Return a temporal value transformed to the given interpolation.
Definition: tsequence.c:1637
TSequence * tsequence_subseq(const TSequence *seq, int from, int to, bool lower_inc, bool upper_inc)
Return a subsequence of a temporal sequence specified by two instants.
Definition: tsequence.c:1418
Temporal * tsequenceset_set_interp(const TSequenceSet *ss, interpType interp)
Return a temporal value transformed to the given interpolation.
Definition: tsequenceset.c:1645
TSequence * tnumberseq_shift_scale_value(const TSequence *seq, Datum shift, Datum width, bool hasshift, bool haswidth)
Return a temporal sequence whose value dimension is shifted and/or scaled by two values.
Definition: tsequence.c:1735
TSequenceSet * tinstant_to_tsequenceset(const TInstant *inst, interpType interp)
Return a temporal instant transformed into a temporal sequence set.
Definition: tsequenceset.c:1435
TSequenceSet * tsequence_to_tsequenceset_free(TSequence *seq)
Return a temporal sequence transformed into a temporal sequence set.
Definition: tsequenceset.c:1482
TSequenceSet * tsequenceset_to_step(const TSequenceSet *ss)
Return a temporal sequence set with continuous base type from linear to step interpolation.
Definition: tsequenceset.c:1571
Temporal * tnumber_shift_scale_value(const Temporal *temp, Datum shift, Datum width, bool hasshift, bool haswidth)
Return a temporal number with the value dimension shifted and/or scaled by two values.
Definition: temporal.c:1674
TSequence * tsequenceset_to_tsequence(const TSequenceSet *ss)
Return a temporal sequence set transformed into a temporal sequence value.
Definition: tsequenceset.c:1522
void tsequenceset_restart(TSequenceSet *ss, int count)
Return a temporal sequence set restared by keeping only the last n sequences.
Definition: tsequenceset.c:1393
TSequence * tsequence_compact(const TSequence *seq)
Return a copy of a temporal sequence without any extra storage space.
Definition: tsequence.c:1341
TInstant * tnumberinst_shift_value(const TInstant *inst, Datum shift)
Return a temporal instant whose value is shifted by a value.
Definition: tinstant.c:472
TInstant * tsequenceset_to_tinstant(const TSequenceSet *ss)
Return a temporal sequence set transformed into a temporal instant.
Definition: tinstant.c:452
TSequenceSet * tsequence_to_tsequenceset_interp(const TSequence *seq, interpType interp)
Return a temporal sequence transformed into a temporal sequence set.
Definition: tsequenceset.c:1498
TSequenceSet * tsequenceset_compact(const TSequenceSet *ss)
Return a copy of a temporal sequence set without any extra storage space.
Definition: tsequenceset.c:1320
TInstant * tinstant_shift_time(const TInstant *inst, const Interval *interv)
Return a temporal instant shifted by an interval.
Definition: tinstant.c:491
TSequenceSet * tsequence_to_tsequenceset(const TSequence *seq)
Return a temporal sequence transformed into a temporal sequence set.
Definition: tsequenceset.c:1462
TSequenceSet * tnumberseqset_shift_scale_value(const TSequenceSet *ss, Datum start, Datum width, bool hasshift, bool haswidth)
Return a temporal sequence set where the value dimension is shifted and/or scaled by two values.
Definition: tsequenceset.c:1672
meosType
Enumeration that defines the built-in and temporal types used in MobilityDB.
Definition: meos_catalog.h:55
set(CBUFFER_SRCS cbuffer.c tcbuffer.c tcbuffer_boxops.c tcbuffer_compops.c tcbuffer_distance.c tcbuffer_spatialfuncs.c tcbuffer_spatialrels.c tcbuffer_tempspatialrels.c) if(1) list(APPEND CBUFFER_SRCS cbufferset_meos.c) endif() add_library(cbuffer OBJECT $
Definition: CMakeLists.txt:1
interpType
Enumeration that defines the interpolation types used in MEOS.
Definition: meos.h:161
External API of the Mobility Engine Open Source (MEOS) library.
#define SET_VAL_N(s, index)
Return the n-th value of a set.
Definition: meos_internal.h:616
#define TSEQUENCESET_SEQ_N(ss, index)
Return the n-th sequence of a temporal sequence set.
Definition: meos_internal.h:671
#define TSEQUENCESET_OFFSETS_PTR(ss)
Return a pointer to the offsets array of a temporal sequence set.
Definition: meos_internal.h:662
void tstzspanset_set_tbox(const SpanSet *ss, TBox *box)
#define SET_OFFSETS_PTR(s)
Return a pointer to the offsets array of a set.
Definition: meos_internal.h:609
Temporal ** tnumber_value_split(const Temporal *temp, Datum vsize, Datum vorigin, Datum **bins, int *count)
Split a temporal number into an array of fragments according to value bins.
Definition: temporal_tile_meos.c:1193
TSequence * tsequence_from_base_temp(Datum value, meosType temptype, const TSequence *seq)
Return a temporal sequence from a base value and the time frame of another temporal sequence.
Definition: temporal.c:897
Datum datum_ceil(Datum d)
Return a number rounded up to the nearest integer.
Definition: temporal.c:1302
Datum datum_float_round(Datum value, Datum size)
Return a float number rounded to a given number of decimal places.
Definition: temporal.c:1281
TBox * tbox_get_value_time_tile(Datum value, TimestampTz t, Datum vsize, const Interval *duration, Datum vorigin, TimestampTz torigin, meosType basetype, meosType spantype)
Return a tile in a multidimensional grid for temporal numbers.
Definition: temporal_tile.c:816
Datum datum_radians(Datum d)
Return a double converted from degrees to radians.
Definition: temporal.c:1386
Datum datum_floor(Datum d)
Return a number rounded down to the nearest integer.
Definition: temporal.c:1293
Span * spanset_bins(const SpanSet *ss, Datum size, Datum origin, int *count)
Return the bins from a span set.
Definition: temporal_tile.c:478
gsl_rng * gsl_get_aggregation_rng(void)
Get the random generator used by temporal aggregation.
Definition: meos.c:103
uint32 datum_hash(Datum d, meosType basetype)
Return the 32-bit hash of a value.
Definition: type_util.c:389
TInstant * tinstant_make_free(Datum value, meosType temptype, TimestampTz t)
Return a temporal instant created from the values and free the base value after the creation.
Definition: tinstant.c:275
Temporal ** tnumber_value_time_split(const Temporal *temp, Datum size, const Interval *duration, Datum vorigin, TimestampTz torigin, Datum **value_bins, TimestampTz **time_bins, int *count)
Return a temporal value split according to a base value and possibly a temporal grid.
Definition: temporal_tile_meos.c:1231
TSequenceSet * tsequenceset_from_base_temp(Datum value, meosType temptype, const TSequenceSet *ss)
Return a temporal sequence set from a base value and the time frame of another temporal sequence set.
Definition: temporal.c:916
#define TSEQUENCE_INST_N(seq, index)
Return the n-th instant of a temporal sequence.
Definition: meos_internal.h:654
#define SET_BBOX_PTR(s)
Return a pointer to the bounding box of a set (if any)
Definition: meos_internal.h:603
TSequenceSet * tseqsetarr_to_tseqset(TSequenceSet **seqsets, int count, int totalseqs)
Return an array of temporal sequences converted from an array of temporal sequence sets.
Definition: tsequenceset.c:629
#define SPANSET_SP_N(ss, index)
Return the n-th span of a span set.
Definition: meos_internal.h:628
gsl_rng * gsl_get_generation_rng(void)
Get the random generator used by the data generator.
Definition: meos.c:92
Span * span_bins(const Span *s, Datum size, Datum origin, int *count)
Return the bins from a span.
Definition: temporal_tile.c:429
Set * textcat_textset_text_int(const Set *s, const text *txt, bool invert)
Return the concatenation of a text set and a set (internal function)
Definition: set.c:899
Span * tnumber_value_bins(const Temporal *temp, Datum size, Datum origin, int *count)
Return the bins of a temporal number.
Definition: temporal_tile.c:582
void numspanset_set_tbox(const SpanSet *ss, TBox *box)
Datum datum_degrees(Datum d, Datum normalize)
Return a double converted from radians to degrees.
Definition: temporal.c:1376
TBox * tnumber_value_time_boxes(const Temporal *temp, Datum vsize, const Interval *duration, Datum vorigin, TimestampTz torigin, int *count)
Return the temporal boxes of a temporal number split with respect to a value and possibly a time grid...
Definition: temporal_tile.c:895
#define TSEQUENCE_OFFSETS_PTR(seq)
Return a pointer to the offsets array of a temporal sequence.
Definition: meos_internal.h:645
uint64 datum_hash_extended(Datum d, meosType basetype, uint64 seed)
Return the 64-bit hash of a value using a seed.
Definition: type_util.c:438
int64 TimestampTz
Definition: postgres_ext_defs.in.h:22
unsigned int uint32
Definition: postgres_ext_defs.in.h:16
uintptr_t Datum
Definition: postgres_ext_defs.in.h:7
unsigned long int uint64
Definition: postgres_ext_defs.in.h:17
Definition: postgres_ext_defs.in.h:27
Structure to represent sets of values.
Definition: meos.h:80
Structure to represent skiplists that keep the current state of an aggregation.
Definition: meos.h:272
Structure to represent span sets.
Definition: meos.h:108
Structure to represent spans (a.k.a.
Definition: meos.h:94
Structure to represent temporal boxes.
Definition: meos.h:124
Structure to represent temporal values of instant subtype.
Definition: meos.h:185
Structure to represent temporal values of sequence set subtype.
Definition: meos.h:224
Structure to represent temporal values of sequence subtype.
Definition: meos.h:202
Structure to represent the common structure of temporal values of any temporal subtype.
Definition: meos.h:173
Definition: postgres_ext_defs.in.h:34
#define connect(s, name, namelen)
Definition: win32_port.h:463