MobilityDB 1.3
Loading...
Searching...
No Matches
Macros | Functions
meos_internal.h File Reference
#include <stddef.h>
#include <json-c/json.h>
#include <gsl/gsl_rng.h>
#include <gsl/gsl_randist.h>
#include <proj.h>
#include <meos.h>
#include "temporal/meos_catalog.h"

Go to the source code of this file.

Macros

#define DatumGetTimestampTz(X)   ((TimestampTz) DatumGetInt64(X))
 
#define MEOS_FLAG_BYVAL   0x0001
 
#define MEOS_FLAG_CONTINUOUS   0x0002
 
#define MEOS_FLAG_GEODETIC   0x0080
 
#define MEOS_FLAG_GEOM   0x0100
 
#define MEOS_FLAG_ORDERED   0x0002
 
#define MEOS_FLAG_T   0x0040
 
#define MEOS_FLAG_X   0x0010
 
#define MEOS_FLAG_Z   0x0020
 
#define MEOS_FLAGS_BYREF(flags)   ((bool) (((flags) & ! MEOS_FLAG_BYVAL)))
 
#define MEOS_FLAGS_DISCRETE_INTERP(flags)   ((bool) (MEOS_FLAGS_GET_INTERP((flags)) == DISCRETE))
 
#define MEOS_FLAGS_GET_BYVAL(flags)   ((bool) (((flags) & MEOS_FLAG_BYVAL)))
 
#define MEOS_FLAGS_GET_CONTINUOUS(flags)   ((bool) (((flags) & MEOS_FLAG_CONTINUOUS)>>1))
 
#define MEOS_FLAGS_GET_GEODETIC(flags)   ((bool) (((flags) & MEOS_FLAG_GEODETIC)>>7))
 
#define MEOS_FLAGS_GET_GEOM(flags)   ((bool) (((flags) & MEOS_FLAG_GEOM)>>8))
 
#define MEOS_FLAGS_GET_INTERP(flags)   (((flags) & MEOS_FLAGS_INTERP) >> 2)
 
#define MEOS_FLAGS_GET_ORDERED(flags)   ((bool) (((flags) & MEOS_FLAG_ORDERED)>>1))
 
#define MEOS_FLAGS_GET_T(flags)   ((bool) (((flags) & MEOS_FLAG_T)>>6))
 
#define MEOS_FLAGS_GET_X(flags)   ((bool) (((flags) & MEOS_FLAG_X)>>4))
 
#define MEOS_FLAGS_GET_Z(flags)   ((bool) (((flags) & MEOS_FLAG_Z)>>5))
 
#define MEOS_FLAGS_INTERP   0x000C
 
#define MEOS_FLAGS_LINEAR_INTERP(flags)   ((bool) (MEOS_FLAGS_GET_INTERP((flags)) == LINEAR))
 
#define MEOS_FLAGS_SET_BYVAL(flags, value)    ((flags) = (value) ? ((flags) | MEOS_FLAG_BYVAL) : ((flags) & ~MEOS_FLAG_BYVAL))
 
#define MEOS_FLAGS_SET_CONTINUOUS(flags, value)    ((flags) = (value) ? ((flags) | MEOS_FLAG_CONTINUOUS) : ((flags) & ~MEOS_FLAG_CONTINUOUS))
 
#define MEOS_FLAGS_SET_GEODETIC(flags, value)    ((flags) = (value) ? ((flags) | MEOS_FLAG_GEODETIC) : ((flags) & ~MEOS_FLAG_GEODETIC))
 
#define MEOS_FLAGS_SET_GEOM(flags, value)    ((flags) = (value) ? ((flags) | MEOS_FLAG_GEOM) : ((flags) & ~MEOS_FLAG_GEOM))
 
#define MEOS_FLAGS_SET_INTERP(flags, value)   ((flags) = (((flags) & ~MEOS_FLAGS_INTERP) | ((value & 0x0003) << 2)))
 
#define MEOS_FLAGS_SET_ORDERED(flags, value)    ((flags) = (value) ? ((flags) | MEOS_FLAG_ORDERED) : ((flags) & ~MEOS_FLAG_ORDERED))
 
#define MEOS_FLAGS_SET_T(flags, value)    ((flags) = (value) ? ((flags) | MEOS_FLAG_T) : ((flags) & ~MEOS_FLAG_T))
 
#define MEOS_FLAGS_SET_X(flags, value)    ((flags) = (value) ? ((flags) | MEOS_FLAG_X) : ((flags) & ~MEOS_FLAG_X))
 
#define MEOS_FLAGS_SET_Z(flags, value)    ((flags) = (value) ? ((flags) | MEOS_FLAG_Z) : ((flags) & ~MEOS_FLAG_Z))
 
#define MEOS_FLAGS_STEP_INTERP(flags)   ((bool) (MEOS_FLAGS_GET_INTERP((flags)) == STEP))
 
#define MEOS_FLAGS_STEP_LINEAR_INTERP(flags)    ((bool) (MEOS_FLAGS_GET_INTERP((flags)) == STEP || MEOS_FLAGS_GET_INTERP((flags)) == LINEAR))
 
#define SET_BBOX_PTR(s)
 Return a pointer to the bounding box of a set (if any) More...
 
#define SET_OFFSETS_PTR(s)
 Return a pointer to the offsets array of a set. More...
 
#define SET_VAL_N(s, index)
 Return the n-th value of a set. More...
 
#define SPANSET_SP_N(ss, index)   (const Span *) &((ss)->elems[(index)])
 Return the n-th span of a span set. More...
 
#define TimestampTzGetDatum(X)   Int64GetDatum(X)
 
#define TSEQUENCE_INST_N(seq, index)
 Return the n-th instant of a temporal sequence. More...
 
#define TSEQUENCE_OFFSETS_PTR(seq)
 Return a pointer to the offsets array of a temporal sequence. More...
 
#define TSEQUENCESET_OFFSETS_PTR(ss)
 Return a pointer to the offsets array of a temporal sequence set. More...
 
#define TSEQUENCESET_SEQ_N(ss, index)
 Return the n-th sequence of a temporal sequence set. More...
 
#define VALIDATE_BIGINTSET(set, ret)
 Macro for ensuring that a set is a big integer set. More...
 
#define VALIDATE_BIGINTSPAN(span, ret)
 Macro for ensuring that a span is a big integer span. More...
 
#define VALIDATE_BIGINTSPANSET(ss, ret)
 Macro for ensuring that a span set is a big integer span set. More...
 
#define VALIDATE_DATESET(set, ret)
 Macro for ensuring that a set is a date set. More...
 
#define VALIDATE_DATESPAN(span, ret)
 Macro for ensuring that a span is a date span. More...
 
#define VALIDATE_DATESPANSET(ss, ret)
 Macro for ensuring that a span set is a date span set. More...
 
#define VALIDATE_FLOATSET(set, ret)
 Macro for ensuring that a set is a float set. More...
 
#define VALIDATE_FLOATSPAN(span, ret)
 Macro for ensuring that a span is a float span. More...
 
#define VALIDATE_FLOATSPANSET(ss, ret)
 Macro for ensuring that a span set is a float span set. More...
 
#define VALIDATE_INTSET(set, ret)
 Macro for ensuring that a set is an integer set. More...
 
#define VALIDATE_INTSPAN(span, ret)
 Macro for ensuring that a span is an integer span. More...
 
#define VALIDATE_INTSPANSET(ss, ret)
 Macro for ensuring that a span set is an integer span set. More...
 
#define VALIDATE_NOT_NULL(ptr, ret)    do { if (! ensure_not_null((void *) (ptr))) return (ret); } while (0)
 Internal API of the Mobility Engine Open Source(MEOS) library. More...
 
#define VALIDATE_NUMSET(set, ret)
 Macro for ensuring that the span is a number span. More...
 
#define VALIDATE_NUMSPAN(span, ret)
 Macro for ensuring that the span is a number span. More...
 
#define VALIDATE_NUMSPANSET(ss, ret)
 Macro for ensuring that the span set is a number span set. More...
 
#define VALIDATE_TBOOL(temp, ret)
 Macro for ensuring that the temporal value is a temporal Boolean. More...
 
#define VALIDATE_TEXTSET(set, ret)
 Macro for ensuring that a set is a text set. More...
 
#define VALIDATE_TFLOAT(temp, ret)
 Macro for ensuring that the temporal value is a temporal float. More...
 
#define VALIDATE_TINT(temp, ret)
 Macro for ensuring that the temporal value is a temporal integer. More...
 
#define VALIDATE_TNUMBER(temp, ret)
 Macro for ensuring that the temporal value is a temporal number. More...
 
#define VALIDATE_TSTZSET(set, ret)
 Macro for ensuring that a set is a timestamptz set. More...
 
#define VALIDATE_TSTZSPAN(span, ret)
 Macro for ensuring that the span is a timestamptz span. More...
 
#define VALIDATE_TSTZSPANSET(ss, ret)
 Macro for ensuring that the span set is a timestamptz span set. More...
 
#define VALIDATE_TTEXT(temp, ret)
 Macro for ensuring that the temporal value is a temporal text. More...
 

Functions

bool adjacent_span_value (const Span *s, Datum value)
 Return true if a span and a value are adjacent. More...
 
bool adjacent_spanset_value (const SpanSet *ss, Datum value)
 Return true if a span set and a value are adjacent. More...
 
bool adjacent_value_spanset (Datum value, const SpanSet *ss)
 Return true if a span set and a value are adjacent. More...
 
int always_eq_base_temporal (Datum value, const Temporal *temp)
 Return true if a temporal value is always equal to a base value. More...
 
int always_eq_temporal_base (const Temporal *temp, Datum value)
 Return true if a temporal value is always equal to a base value. More...
 
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. More...
 
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. More...
 
int always_gt_base_temporal (Datum value, const Temporal *temp)
 Return true if a temporal value is always greater than a base value. More...
 
int always_gt_temporal_base (const Temporal *temp, Datum value)
 Return true if a temporal value is always greater than a base value. More...
 
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. More...
 
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. More...
 
int always_lt_base_temporal (Datum value, const Temporal *temp)
 Return true if a temporal value is always less than a base value. More...
 
int always_lt_temporal_base (const Temporal *temp, Datum value)
 Return true if a temporal value is always less than a base value. More...
 
int always_ne_base_temporal (Datum value, const Temporal *temp)
 Return true if a temporal value is always different from a base value. More...
 
int always_ne_temporal_base (const Temporal *temp, Datum value)
 Return true if a temporal value is always different from a base value. More...
 
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. More...
 
bool contained_value_set (Datum value, const Set *s)
 Return true if a value is contained in a set. More...
 
bool contained_value_span (Datum value, const Span *s)
 Return true if a value is contained in a span. More...
 
bool contained_value_spanset (Datum value, const SpanSet *ss)
 Return true if a value is contained in a span set. More...
 
bool contains_set_value (const Set *s, Datum value)
 Return true if a set contains a value. More...
 
bool contains_span_value (const Span *s, Datum value)
 Return true if a span contains a value. More...
 
bool contains_spanset_value (const SpanSet *ss, Datum value)
 Return true if a span set contains a value. More...
 
void datespan_set_tstzspan (const Span *s1, Span *s2)
 Return the second span initialized with the first one transformed to a timetstamptz span. More...
 
Datum datum_ceil (Datum d)
 Return a number rounded up to the nearest integer. More...
 
Datum datum_degrees (Datum d, Datum normalize)
 Return a double converted from radians to degrees. More...
 
Datum datum_float_round (Datum value, Datum size)
 Return a float number rounded to a given number of decimal places. More...
 
Datum datum_floor (Datum d)
 Return a number rounded down to the nearest integer. More...
 
uint32 datum_hash (Datum d, meosType basetype)
 Return the 32-bit hash of a value. More...
 
uint64 datum_hash_extended (Datum d, meosType basetype, uint64 seed)
 Return the 64-bit hash of a value using a seed. More...
 
Datum datum_radians (Datum d)
 Return a double converted from degrees to radians. More...
 
Datum distance_set_set (const Set *s1, const Set *s2)
 Return the distance between two sets. More...
 
Datum distance_set_value (const Set *s, Datum value)
 Return the distance between a set and a value. More...
 
Datum distance_span_span (const Span *s1, const Span *s2)
 Return the distance between two spans as a double. More...
 
Datum distance_span_value (const Span *s, Datum value)
 Return the distance between a span and a value as a double. More...
 
Datum distance_spanset_span (const SpanSet *ss, const Span *s)
 Return the distance between a span set and a span. More...
 
Datum distance_spanset_spanset (const SpanSet *ss1, const SpanSet *ss2)
 Return the distance between two span sets. More...
 
Datum distance_spanset_value (const SpanSet *ss, Datum value)
 Return the distance between a span set and a value. More...
 
Temporaldistance_tnumber_number (const Temporal *temp, Datum value)
 Return the temporal distance between a temporal number and a number. More...
 
Datum distance_value_value (Datum l, Datum r, meosType basetype)
 Return the distance between two values. More...
 
int ever_eq_base_temporal (Datum value, const Temporal *temp)
 Return true if a temporal value is ever equal to a base value. More...
 
int ever_eq_temporal_base (const Temporal *temp, Datum value)
 Return true if a temporal value is ever equal to a base value. More...
 
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. More...
 
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. More...
 
int ever_gt_base_temporal (Datum value, const Temporal *temp)
 Return true if a temporal value is ever greater than a base value. More...
 
int ever_gt_temporal_base (const Temporal *temp, Datum value)
 Return true if a temporal value is ever greater than a base value. More...
 
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. More...
 
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. More...
 
int ever_lt_base_temporal (Datum value, const Temporal *temp)
 Return true if a temporal value is ever less than a base value. More...
 
int ever_lt_temporal_base (const Temporal *temp, Datum value)
 Return true if a temporal value is ever less than a base value. More...
 
int ever_ne_base_temporal (Datum value, const Temporal *temp)
 Return true if a temporal value is ever different from a base value. More...
 
int ever_ne_temporal_base (const Temporal *temp, Datum value)
 Return true if a temporal value is ever different from a base value. More...
 
void float_set_tbox (double d, TBox *box)
 Return in the last argument a temporal box constructed from a float. More...
 
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. More...
 
void floatspan_set_intspan (const Span *s1, Span *s2)
 Return the second span initialized with the first one transformed to an integer span. More...
 
gsl_rng * gsl_get_aggregation_rng (void)
 Get the random generator used by temporal aggregation. More...
 
gsl_rng * gsl_get_generation_rng (void)
 Get the random generator used by the data generator. More...
 
void int_set_tbox (int i, TBox *box)
 Return in the last argument a temporal box constructed from an integer. More...
 
bool inter_span_span (const Span *s1, const Span *s2, Span *result)
 Return in the last argument the intersection of two spans. More...
 
bool inter_tbox_tbox (const TBox *box1, const TBox *box2, TBox *result)
 Return in the last argument the intersection of two temporal boxes. More...
 
Setintersection_set_value (const Set *s, Datum value)
 Return the intersection of a set and a value. More...
 
Spanintersection_span_value (const Span *s, Datum value)
 Return the intersection of a span and a value. More...
 
SpanSetintersection_spanset_value (const SpanSet *ss, Datum value)
 Return the intersection of a span set and a value. More...
 
Setintersection_value_set (Datum value, const Set *s)
 Return the union of a value and a set. More...
 
Spanintersection_value_span (Datum value, const Span *s)
 Return the union of a value and a span. More...
 
SpanSetintersection_value_spanset (Datum value, const SpanSet *ss)
 Return the intersection of a value and a span set. More...
 
void intspan_set_floatspan (const Span *s1, Span *s2)
 Return the second span initialized with the first one transformed to a float span. More...
 
bool left_set_value (const Set *s, Datum value)
 Return true if a set is to the left of a value. More...
 
bool left_span_value (const Span *s, Datum value)
 Return true if a span is to the left of a value. More...
 
bool left_spanset_value (const SpanSet *ss, Datum value)
 Return true if a span set is to the left of a value. More...
 
bool left_value_set (Datum value, const Set *s)
 Return true if a value is to the left of a set. More...
 
bool left_value_span (Datum value, const Span *s)
 Return true if a value is to the left of a span. More...
 
bool left_value_spanset (Datum value, const SpanSet *ss)
 Return true if a value is to the left of a span set. More...
 
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. More...
 
int mi_span_span (const Span *s1, const Span *s2, Span *result)
 Return in the last argument the difference of two spans. More...
 
Setminus_set_value (const Set *s, Datum value)
 Return the difference of a set and a value. More...
 
SpanSetminus_span_value (const Span *s, Datum value)
 Return the difference of a span and a value. More...
 
SpanSetminus_spanset_value (const SpanSet *ss, Datum value)
 Return the difference of a span set and a value. More...
 
Setminus_value_set (Datum value, const Set *s)
 Return the difference of a value and a set. More...
 
SpanSetminus_value_span (Datum value, const Span *s)
 Return the difference of a value and a span. More...
 
SpanSetminus_value_spanset (Datum value, const SpanSet *ss)
 Return the difference of a value and a span set. More...
 
double nad_tbox_tbox (const TBox *box1, const TBox *box2)
 Return the nearest approach distance between the temporal boxes. More...
 
double nad_tnumber_number (const Temporal *temp, Datum value)
 Return the nearest approach distance between a temporal number and a number. More...
 
double nad_tnumber_tbox (const Temporal *temp, const TBox *box)
 Return the nearest approach distance between a temporal number and a temporal box. More...
 
double nad_tnumber_tnumber (const Temporal *temp1, const Temporal *temp2)
 Return the nearest approach distance between two temporal numbers. More...
 
void number_set_tbox (Datum d, meosType basetype, TBox *box)
 Return in the last argument a temporal box constructed from a number. More...
 
TBoxnumber_tbox (Datum value, meosType basetype)
 Convert a number into a temporal box. More...
 
TBoxnumber_timestamptz_to_tbox (Datum d, meosType basetype, TimestampTz t)
 Return a temporal box from an integer and a timestamptz. More...
 
TBoxnumber_tstzspan_to_tbox (Datum d, meosType basetype, const Span *s)
 Return a temporal box from an integer and a timestamptz span. More...
 
void numset_set_tbox (const Set *s, TBox *box)
 Return in the last argument a temporal box constructed from a number set. More...
 
Setnumset_shift_scale (const Set *s, Datum shift, Datum width, bool hasshift, bool haswidth)
 Return a number set shifted and/or scaled by two values. More...
 
Spannumspan_expand (const Span *s, Datum value)
 Return a number span with its bounds expanded/decreased by a value. More...
 
void numspan_set_tbox (const Span *span, TBox *box)
 Return in the last argument a temporal box constructed from a number span. More...
 
Spannumspan_shift_scale (const Span *s, Datum shift, Datum width, bool hasshift, bool haswidth)
 Return a number span shifted and/or scaled by two values. More...
 
Datum numspan_width (const Span *s)
 Return the width of a span. More...
 
void numspanset_set_tbox (const SpanSet *ss, TBox *box)
 
SpanSetnumspanset_shift_scale (const SpanSet *ss, Datum shift, Datum width, bool hasshift, bool haswidth)
 Return a number set shifted and/or scaled by two intervals. More...
 
Datum numspanset_width (const SpanSet *ss, bool boundspan)
 Return the width of a span set. More...
 
bool ovadj_span_span (const Span *s1, const Span *s2)
 Return true if two spans overlap or are adjacent. More...
 
bool overleft_set_value (const Set *s, Datum value)
 Return true if a set does not extend to the right of a value. More...
 
bool overleft_span_value (const Span *s, Datum value)
 Return true if a span does not extend to the right of a value. More...
 
bool overleft_spanset_value (const SpanSet *ss, Datum value)
 Return true if a span set does not extend to the right of a value. More...
 
bool overleft_value_set (Datum value, const Set *s)
 Return true if a value does not extend to the right of a set. More...
 
bool overleft_value_span (Datum value, const Span *s)
 Return true if a value does not extend to the right of a span. More...
 
bool overleft_value_spanset (Datum value, const SpanSet *ss)
 Return true if a value does not extend to the right of a span set. More...
 
bool overright_set_value (const Set *s, Datum value)
 Return true if a set does not extend to the left of a value. More...
 
bool overright_span_value (const Span *s, Datum value)
 Return true if a span does not extend to the left of a value. More...
 
bool overright_spanset_value (const SpanSet *ss, Datum value)
 Return true if a span set does not extend to the left of a value. More...
 
bool overright_value_set (Datum value, const Set *s)
 Return true if a value does not extend to the the left of a set. More...
 
bool overright_value_span (Datum value, const Span *s)
 Return true if a value does not extend to the left of a span. More...
 
bool overright_value_spanset (Datum value, const SpanSet *ss)
 Return true if a value does not extend to the left of a span set. More...
 
bool right_set_value (const Set *s, Datum value)
 Return true if a set is to the right of a value. More...
 
bool right_span_value (const Span *s, Datum value)
 Return true if a span is to the right of a value. More...
 
bool right_spanset_value (const SpanSet *ss, Datum value)
 Return true if a span set is to the right of a value. More...
 
bool right_value_set (Datum value, const Set *s)
 Return true if a value is to the right of a set. More...
 
bool right_value_span (Datum value, const Span *s)
 Return true if a value is to the right of a span. More...
 
bool right_value_spanset (Datum value, const SpanSet *ss)
 Return true if a value is to the right of a span set. More...
 
Setset_compact (const Set *s)
 Return a copy of a set ordered, without duplicates, and without any additional free space. More...
 
Datum set_end_value (const Set *s)
 Return a copy of the end value of a set. More...
 
Setset_in (const char *str, meosType basetype)
 Return a set from its Well-Known Text (WKT) representation. More...
 
Setset_make (const Datum *values, int count, meosType basetype, bool order)
 Return a set from an array of values. More...
 
Setset_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. More...
 
Setset_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. More...
 
int set_mem_size (const Set *s)
 Return the size in bytes of a set. More...
 
char * set_out (const Set *s, int maxdd)
 Return the Well-Known Text (WKT) representation of a set. More...
 
void set_set_span (const Set *s, Span *result)
 Return in the last argument the bounding span of a set. More...
 
void set_set_subspan (const Set *s, int minidx, int maxidx, Span *result)
 Return in the last argument the bounding span of a set. More...
 
Spanset_span (const Set *s)
 Convert a set into a span. More...
 
SpanSetset_spanset (const Set *s)
 Convert a set into a span set. More...
 
Datum set_start_value (const Set *s)
 Return a copy of the start value of a set. More...
 
Datumset_vals (const Set *s)
 Return the array of (pointers to the) values of a set. More...
 
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. More...
 
Datumset_values (const Set *s)
 Return the array of (copies of) values of a set. More...
 
void skiplist_free (SkipList *list)
 Delete the skiplist and free its allocated memory. More...
 
Spanspan_bins (const Span *s, Datum size, Datum origin, int *count)
 Return the bins from a span. More...
 
void span_expand (const Span *s1, Span *s2)
 Return the second span expanded with the first one. More...
 
Spanspan_in (const char *str, meosType spantype)
 Return a span from its Well-Known Text (WKT) representation. More...
 
Spanspan_make (Datum lower, Datum upper, bool lower_inc, bool upper_inc, meosType basetype)
 Return a span from the bounds. More...
 
char * span_out (const Span *s, int maxdd)
 Return the Well-Known Text (WKT) representation of a span. More...
 
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. More...
 
Spanspanbase_extent_transfn (Span *state, Datum value, meosType basetype)
 Transition function for span extent aggregate of values. More...
 
Spanspanset_bins (const SpanSet *ss, Datum size, Datum origin, int *count)
 Return the bins from a span set. More...
 
SpanSetspanset_compact (const SpanSet *ss)
 Return a copy of a span set without any extra storage space. More...
 
SpanSetspanset_in (const char *str, meosType spantype)
 Return a span set from its Well-Known Text (WKT) representation. More...
 
Datum spanset_lower (const SpanSet *ss)
 Return the lower bound a span set. More...
 
SpanSetspanset_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. More...
 
SpanSetspanset_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. More...
 
int spanset_mem_size (const SpanSet *ss)
 Return the size in bytes of a span set. More...
 
char * spanset_out (const SpanSet *ss, int maxdd)
 Return the Well-Known Text (WKT) representation of a span set. More...
 
const Span ** spanset_sps (const SpanSet *ss)
 Return an array of pointers to the spans of a span set. More...
 
Datum spanset_upper (const SpanSet *ss)
 Return the lower bound a span set. More...
 
Spansuper_union_span_span (const Span *s1, const Span *s2)
 Return the bounding union of two spans. More...
 
TInstanttboolinst_from_mfjson (json_object *mfjson)
 Return a temporal boolean instant from its MF-JSON representation. More...
 
TInstanttboolinst_in (const char *str)
 Return a temporal boolean instant from its Well-Known Text (WKT) representation. More...
 
TSequencetboolseq_from_mfjson (json_object *mfjson)
 Return a temporal boolean sequence from its MF-JSON representation. More...
 
TSequencetboolseq_in (const char *str, interpType interp)
 Return a temporal boolean sequence from its Well-Known Text (WKT) representation. More...
 
TSequenceSettboolseqset_from_mfjson (json_object *mfjson)
 Return a temporal boolean sequence set from its MF-JSON representation. More...
 
TSequenceSettboolseqset_in (const char *str)
 Return a temporal boolean sequence set from its Well-Known Text (WKT) representation. More...
 
void tbox_expand (const TBox *box1, TBox *box2)
 Return the second temporal box expanded with the first one. More...
 
TBoxtbox_expand_value (const TBox *box, Datum value, meosType basetyp)
 Return a temporal box with the value span expanded/decreased by a value. More...
 
TBoxtbox_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. More...
 
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. More...
 
TBoxtbox_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. More...
 
TSequenceSettcontseq_restrict_minmax (const TSequence *seq, bool min, bool atfunc)
 Restrict a temporal continuous sequence to (the complement of) its minimum/maximum base value. More...
 
TSequencetdiscseq_restrict_minmax (const TSequence *seq, bool min, bool atfunc)
 Restrict a temporal discrete sequence to (the complement of) its minimum/maximum base value. More...
 
char ** temparr_out (const Temporal **temparr, int count, int maxdd)
 Return the Well-Known Text (WKT) representation of an array of temporal values. More...
 
Temporaltemporal_app_tinst_transfn (Temporal *state, const TInstant *inst, interpType interp, double maxdist, const Interval *maxt)
 Transition function for append temporal instant aggregate. More...
 
Temporaltemporal_app_tseq_transfn (Temporal *state, const TSequence *seq)
 Transition function for append temporal sequence aggregate. More...
 
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. More...
 
Temporaltemporal_compact (const Temporal *temp)
 Return a copy of a temporal value without any extra storage space. More...
 
const TInstanttemporal_end_inst (const Temporal *temp)
 Return a pointer to the end instant of a temporal value. More...
 
Datum temporal_end_value (const Temporal *temp)
 Return a copy of the end base value of a temporal value. More...
 
Temporaltemporal_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. More...
 
Temporaltemporal_from_mfjson (const char *mfjson, meosType temptype)
 Return a temporal object from its MF-JSON representation. More...
 
Temporaltemporal_in (const char *str, meosType temptype)
 Return a temporal value from its Well-Known Text (WKT) representation. More...
 
const TInstanttemporal_inst_n (const Temporal *temp, int n)
 Return a pointer to the n-th instant of a temporal value. More...
 
const TInstant ** temporal_instants_p (const Temporal *temp, int *count)
 Return an array of pointers to the distinct instants of a temporal value. More...
 
Datum temporal_max_value (const Temporal *temp)
 Return a copy of the maximum base value of a temporal value. More...
 
size_t temporal_mem_size (const Temporal *temp)
 Return the size in bytes of a temporal value. More...
 
Datum temporal_min_value (const Temporal *temp)
 Return a copy of the minimum base value of a temporal value. More...
 
char * temporal_out (const Temporal *temp, int maxdd)
 Return the Well-Known Text (WKT) representation of a temporal value. More...
 
void temporal_restart (Temporal *temp, int count)
 Return a temporal sequence (set) that keepsg only the last n instants or sequences. More...
 
Temporaltemporal_restrict_minmax (const Temporal *temp, bool min, bool atfunc)
 Restrict a temporal value to (the complement of) a minimum base value. More...
 
Temporaltemporal_restrict_timestamptz (const Temporal *temp, TimestampTz t, bool atfunc)
 Restrict a temporal value to a timestamp. More...
 
Temporaltemporal_restrict_tstzset (const Temporal *temp, const Set *s, bool atfunc)
 Restrict a temporal value to (the complement of) a timestamp set. More...
 
Temporaltemporal_restrict_tstzspan (const Temporal *temp, const Span *s, bool atfunc)
 Restrict a temporal value to (the complement of) a timestamptz span. More...
 
Temporaltemporal_restrict_tstzspanset (const Temporal *temp, const SpanSet *ss, bool atfunc)
 Restrict a temporal value to (the complement of) a span set. More...
 
Temporaltemporal_restrict_value (const Temporal *temp, Datum value, bool atfunc)
 Restrict a temporal value to (the complement of) a base value. More...
 
Temporaltemporal_restrict_values (const Temporal *temp, const Set *set, bool atfunc)
 Restrict a temporal value to (the complement of) a set of base values. More...
 
const TSequence ** temporal_sequences_p (const Temporal *temp, int *count)
 Return an array of pointers to the sequences of a temporal sequence (set) More...
 
void temporal_set_bbox (const Temporal *temp, void *box)
 Return in the last argument the bounding box of a temporal value. More...
 
void temporal_set_tstzspan (const Temporal *temp, Span *s)
 Return in the last argument the time span of a temporal value. More...
 
const TInstanttemporal_start_inst (const Temporal *temp)
 Return a pointer to the start instant of a temporal value. More...
 
Datum temporal_start_value (const Temporal *temp)
 Return a copy of the start base value of a temporal value. More...
 
TSequencetemporal_tsequence (const Temporal *temp, interpType interp)
 Return a temporal value transformed to a temporal sequence. More...
 
TSequenceSettemporal_tsequenceset (const Temporal *temp, interpType interp)
 Return a temporal value transformed to a temporal sequence set. More...
 
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. More...
 
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. More...
 
Datumtemporal_values (const Temporal *temp, int *count)
 Return the array of copies of the distinct base values of a temporal value. More...
 
Datumtemporal_values_p (const Temporal *temp, int *count)
 Return the array of pointers to the base values of a temporal value. More...
 
Settextcat_textset_text_int (const Set *s, const text *txt, bool invert)
 Return the concatenation of a text set and a set (internal function) More...
 
TInstanttfloatinst_from_mfjson (json_object *mfjson)
 Return a temporal float instant from its MF-JSON representation. More...
 
TInstanttfloatinst_in (const char *str)
 Return a temporal float instant from its Well-Known Text (WKT) representation. More...
 
TSequencetfloatseq_derivative (const TSequence *seq)
 Return the derivative of a temporal float sequence. More...
 
TSequencetfloatseq_from_mfjson (json_object *mfjson, interpType interp)
 Return a temporal float sequence from its MF-JSON representation. More...
 
TSequencetfloatseq_in (const char *str, interpType interp)
 Return a temporal float sequence from its Well-Known Text (WKT) representation. More...
 
TSequenceSettfloatseqset_derivative (const TSequenceSet *ss)
 Return the derivative of a temporal float sequence set. More...
 
TSequenceSettfloatseqset_from_mfjson (json_object *mfjson, interpType interp)
 Return a temporal float sequence set from its MF-JSON representation. More...
 
TSequenceSettfloatseqset_in (const char *str)
 Return a temporal float sequence set from its Well-Known Text (WKT) representation. More...
 
void timestamptz_set_tbox (TimestampTz t, TBox *box)
 Return in the last argument a temporal box constructed from a timestamptz. More...
 
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, or greater than the second one. More...
 
TInstanttinstant_copy (const TInstant *inst)
 Return a copy of a temporal instant. More...
 
bool tinstant_eq (const TInstant *inst1, const TInstant *inst2)
 Return true if two temporal instants are equal. More...
 
TInstanttinstant_from_mfjson (json_object *mfjson, bool spatial, int32_t srid, meosType temptype)
 Return a temporal instant from its MF-JSON representation. More...
 
uint32 tinstant_hash (const TInstant *inst)
 Return the 32-bit hash value of a temporal instant. More...
 
TInstanttinstant_in (const char *str, meosType temptype)
 Return a temporal instant from its Well-Known Text (WKT) representation. More...
 
const TInstant ** tinstant_insts (const TInstant *inst, int *count)
 Return the singleton array of instants of a temporal instant. More...
 
TInstanttinstant_make (Datum value, meosType temptype, TimestampTz t)
 Return a temporal instant from the arguments. More...
 
TInstanttinstant_make_free (Datum value, meosType temptype, TimestampTz t)
 Return a temporal instant created from the values and free the base value after the creation. More...
 
Temporaltinstant_merge (const TInstant *inst1, const TInstant *inst2)
 Merge two temporal instants. More...
 
Temporaltinstant_merge_array (const TInstant **instants, int count)
 Merge an array of temporal instants. More...
 
char * tinstant_out (const TInstant *inst, int maxdd)
 Return the Well-Known Text (WKT) representation of a temporal instant. More...
 
TInstanttinstant_restrict_timestamptz (const TInstant *inst, TimestampTz t, bool atfunc)
 Restrict a temporal instant to (the complement of) a timestamptz. More...
 
TInstanttinstant_restrict_tstzset (const TInstant *inst, const Set *s, bool atfunc)
 Restrict a temporal instant to (the complement of) a timestamptz set. More...
 
TInstanttinstant_restrict_tstzspan (const TInstant *inst, const Span *period, bool atfunc)
 Restrict a temporal instant to (the complement of) a timestamptz span. More...
 
TInstanttinstant_restrict_tstzspanset (const TInstant *inst, const SpanSet *ss, bool atfunc)
 Restrict a temporal instant to (the complement of) a span set. More...
 
TInstanttinstant_restrict_value (const TInstant *inst, Datum value, bool atfunc)
 Restrict a temporal instant to (the complement of) a base value. More...
 
TInstanttinstant_restrict_values (const TInstant *inst, const Set *set, bool atfunc)
 Restrict a temporal instant to a set of base values. More...
 
void tinstant_set_bbox (const TInstant *inst, void *box)
 Return in the last argument the bounding box of a temporal instant. More...
 
void tinstant_set_tstzspan (const TInstant *inst, Span *s)
 Return in the last argument the time span of a temporal instant. More...
 
TInstanttinstant_shift_time (const TInstant *inst, const Interval *interv)
 Return a temporal instant shifted by an interval. More...
 
SpanSettinstant_time (const TInstant *inst)
 Return the time frame of a temporal instant as a span set. More...
 
TimestampTztinstant_timestamps (const TInstant *inst, int *count)
 Return the singleton array of timestamps of a temporal instant. More...
 
TSequencetinstant_to_tsequence (const TInstant *inst, interpType interp)
 Return a temporal instant transformed into a temporal sequence. More...
 
TSequencetinstant_to_tsequence_free (TInstant *inst, interpType interp)
 Return a temporal instant transformed into a temporal sequence. More...
 
TSequenceSettinstant_to_tsequenceset (const TInstant *inst, interpType interp)
 Return a temporal instant transformed into a temporal sequence set. More...
 
Datum tinstant_value (const TInstant *inst)
 Return a copy of the base value of a temporal instant. More...
 
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. More...
 
Datum tinstant_value_p (const TInstant *inst)
 Return (a pointer to) the base value of a temporal instant. More...
 
Datumtinstant_values_p (const TInstant *inst, int *count)
 Return the singleton (pointer to the) base value of a temporal instant. More...
 
TInstanttintinst_from_mfjson (json_object *mfjson)
 Return a temporal integer instant from its MF-JSON representation. More...
 
TInstanttintinst_in (const char *str)
 Return a temporal integer instant from its Well-Known Text (WKT) representation. More...
 
TSequencetintseq_from_mfjson (json_object *mfjson)
 Return a temporal integer sequence from its MF-JSON representation. More...
 
TSequencetintseq_in (const char *str, interpType interp)
 Return a temporal integer sequence from its Well-Known Text (WKT) representation. More...
 
TSequenceSettintseqset_from_mfjson (json_object *mfjson)
 Return a temporal integer sequence set from its MF-JSON representation. More...
 
TSequenceSettintseqset_in (const char *str)
 Return a temporal integer sequence set from its Well-Known Text (WKT) representation. More...
 
Temporaltnumber_restrict_span (const Temporal *temp, const Span *span, bool atfunc)
 Restrict a temporal value to (the complement of) a span of base values. More...
 
Temporaltnumber_restrict_spanset (const Temporal *temp, const SpanSet *ss, bool atfunc)
 Restrict a temporal value to (the complement of) a span set. More...
 
void tnumber_set_span (const Temporal *temp, Span *span)
 Return in the last argument the value span of a temporal number. More...
 
void tnumber_set_tbox (const Temporal *temp, TBox *box)
 Return in the last argument the temporal box of a temporal number. More...
 
Temporaltnumber_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. More...
 
Spantnumber_value_bins (const Temporal *temp, Datum size, Datum origin, int *count)
 Return the bins of a temporal number. More...
 
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. More...
 
TBoxtnumber_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. More...
 
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. More...
 
TInstanttnumberinst_abs (const TInstant *inst)
 Return the absolute value of a temporal number instant. More...
 
TInstanttnumberinst_restrict_span (const TInstant *inst, const Span *span, bool atfunc)
 Restrict a temporal number instant to (the complement of) a span of base values. More...
 
TInstanttnumberinst_restrict_spanset (const TInstant *inst, const SpanSet *ss, bool atfunc)
 Restrict a temporal number instant to (the complement of) a span set. More...
 
void tnumberinst_set_tbox (const TInstant *inst, TBox *box)
 Return in the last argument the temporal box of a temporal number instant. More...
 
TInstanttnumberinst_shift_value (const TInstant *inst, Datum shift)
 Return a temporal instant whose value is shifted by a value. More...
 
SpanSettnumberinst_valuespans (const TInstant *inst)
 Return the base values of a temporal instant number as a span set. More...
 
TSequencetnumberseq_abs (const TSequence *seq)
 Return the absolute value of a temporal number sequence. More...
 
TSequencetnumberseq_angular_difference (const TSequence *seq)
 Return the temporal angular difference of a temporal number sequence. More...
 
TSequencetnumberseq_delta_value (const TSequence *seq)
 Return the delta value of a temporal number sequence. More...
 
double tnumberseq_integral (const TSequence *seq)
 Return the integral (area under the curve) of a temporal sequence number. More...
 
void tnumberseq_set_tbox (const TSequence *seq, TBox *box)
 Return int the last argument the temporal box of a temporal number sequence. More...
 
TSequencetnumberseq_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. More...
 
double tnumberseq_twavg (const TSequence *seq)
 Return the time-weighted average of a temporal sequence number. More...
 
SpanSettnumberseq_valuespans (const TSequence *seq)
 Return the base values of a temporal number sequence as a span set. More...
 
TSequenceSettnumberseqset_abs (const TSequenceSet *ss)
 Return the absolute value of a temporal number sequence set. More...
 
TSequencetnumberseqset_angular_difference (const TSequenceSet *ss)
 Return the angular difference of a temporal number sequence set. More...
 
TSequenceSettnumberseqset_delta_value (const TSequenceSet *ss)
 Return the delta value of a temporal number sequence set. More...
 
double tnumberseqset_integral (const TSequenceSet *ss)
 Return the integral (area under the curve) of a temporal number. More...
 
TSequenceSettnumberseqset_restrict_span (const TSequenceSet *ss, const Span *span, bool atfunc)
 Restrict a temporal number to a span of base values. More...
 
TSequenceSettnumberseqset_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. More...
 
void tnumberseqset_set_tbox (const TSequenceSet *ss, TBox *box)
 Return in the last argument the temporal box of a temporal number sequence. More...
 
TSequenceSettnumberseqset_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. More...
 
double tnumberseqset_twavg (const TSequenceSet *ss)
 Return the time-weighted average of a temporal number. More...
 
SpanSettnumberseqset_valuespans (const TSequenceSet *ss)
 Return the base values of a temporal number sequence set as a number span set. More...
 
TSequenceSettseqsetarr_to_tseqset (TSequenceSet **seqsets, int count, int totalseqs)
 Return an array of temporal sequences converted from an array of temporal sequence sets. More...
 
Temporaltsequence_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. More...
 
Temporaltsequence_append_tsequence (const TSequence *seq1, const TSequence *seq2, bool expand)
 Append a sequence to a temporal sequence. More...
 
TInstanttsequence_at_timestamptz (const TSequence *seq, TimestampTz t)
 Restrict a temporal sequence to a timestamptz. More...
 
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, or greater than the second one. More...
 
TSequencetsequence_compact (const TSequence *seq)
 Return a copy of a temporal sequence without any extra storage space. More...
 
TSequencetsequence_copy (const TSequence *seq)
 Return a copy of a temporal sequence. More...
 
Temporaltsequence_delete_timestamptz (const TSequence *seq, TimestampTz t, bool connect)
 Delete a timestamptz from a temporal value. More...
 
Temporaltsequence_delete_tstzset (const TSequence *seq, const Set *s, bool connect)
 Delete a timestamptz set from a temporal value. More...
 
Temporaltsequence_delete_tstzspan (const TSequence *seq, const Span *s, bool connect)
 Delete a timestamptz span from a temporal sequence. More...
 
Temporaltsequence_delete_tstzspanset (const TSequence *seq, const SpanSet *ss, bool connect)
 Delete a timestamptz span set from a temporal value. More...
 
Intervaltsequence_duration (const TSequence *seq)
 Return the duration of a temporal sequence. More...
 
TimestampTz tsequence_end_timestamptz (const TSequence *seq)
 Return the end timestamptz of a temporal sequence. More...
 
bool tsequence_eq (const TSequence *seq1, const TSequence *seq2)
 Return true if two temporal sequences are equal. More...
 
void tsequence_expand_bbox (TSequence *seq, const TInstant *inst)
 Expand the bounding box of a temporal sequence with an additional instant. More...
 
TSequencetsequence_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. More...
 
TSequencetsequence_from_base_tstzset (Datum value, meosType temptype, const Set *s)
 Return a temporal discrete sequence from a base value and a timestamptz set. More...
 
TSequencetsequence_from_base_tstzspan (Datum value, meosType temptype, const Span *s, interpType interp)
 Return a temporal sequence from a base value and a timestamptz span. More...
 
TSequencetsequence_from_mfjson (json_object *mfjson, bool spatial, int32_t srid, meosType temptype, interpType interp)
 Return a temporal sequence from its MF-JSON representation. More...
 
uint32 tsequence_hash (const TSequence *seq)
 Return the 32-bit hash value of a temporal sequence. More...
 
TSequencetsequence_in (const char *str, meosType temptype, interpType interp)
 Return a temporal sequence from its Well-Known Text (WKT) representation. More...
 
Temporaltsequence_insert (const TSequence *seq1, const TSequence *seq2, bool connect)
 Insert the second temporal value into the first one. More...
 
const TInstant ** tsequence_insts_p (const TSequence *seq)
 Return the array of pointers to distinct instants of a temporal sequence. More...
 
TSequencetsequence_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. More...
 
TSequencetsequence_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 after the creation. More...
 
const TInstanttsequence_max_inst (const TSequence *seq)
 Return a pointer to the instant with minimum base value of a temporal sequence. More...
 
Datum tsequence_max_val (const TSequence *seq)
 Return (a pointer to) the maximum base value of a temporal sequence. More...
 
Temporaltsequence_merge (const TSequence *seq1, const TSequence *seq2)
 Merge two temporal sequences. More...
 
Temporaltsequence_merge_array (const TSequence **sequences, int count)
 Merge an array of temporal sequences. More...
 
const TInstanttsequence_min_inst (const TSequence *seq)
 Return a pointer to the instant with minimum base value of a temporal sequence. More...
 
Datum tsequence_min_val (const TSequence *seq)
 Return (a pointer to) the minimum base value of a temporal sequence. More...
 
char * tsequence_out (const TSequence *seq, int maxdd)
 Return the Well-Known Text (WKT) representation of a temporal sequence. More...
 
void tsequence_restart (TSequence *seq, int count)
 Return a temporal sequence restarted by keeping only the last n instants. More...
 
Temporaltsequence_restrict_tstzspan (const TSequence *seq, const Span *s, bool atfunc)
 Restrict a temporal value to (the complement of) a timestamptz span. More...
 
Temporaltsequence_restrict_tstzspanset (const TSequence *seq, const SpanSet *ss, bool atfunc)
 Restrict a temporal sequence to (the complement of) a timestamptz span set. More...
 
TSequence ** tsequence_segments (const TSequence *seq, int *count)
 Return the array of segments of a temporal sequence. More...
 
const TSequence ** tsequence_seqs (const TSequence *seq, int *count)
 Return a singleton array of pointers to the sequence of a temporal sequence. More...
 
void tsequence_set_bbox (const TSequence *seq, void *box)
 Return in the last argument the bounding box of a temporal sequence. More...
 
Temporaltsequence_set_interp (const TSequence *seq, interpType interp)
 Return a temporal value transformed to the given interpolation. More...
 
void tsequence_set_tstzspan (const TSequence *seq, Span *s)
 Return in the last argument the time span of a temporal sequence. More...
 
TSequencetsequence_shift_scale_time (const TSequence *seq, const Interval *shift, const Interval *duration)
 Return a temporal sequence shifted and/or scaled by two intervals. More...
 
TimestampTz tsequence_start_timestamptz (const TSequence *seq)
 Return the start timestamptz of a temporal sequence. More...
 
TSequencetsequence_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. More...
 
SpanSettsequence_time (const TSequence *seq)
 Return the time frame of a temporal sequence as a span set. More...
 
TimestampTztsequence_timestamps (const TSequence *seq, int *count)
 Return the array of timestamps of a temporal sequence. More...
 
TInstanttsequence_to_tinstant (const TSequence *seq)
 Return a temporal sequence transformed into a temporal instant. More...
 
TSequenceSettsequence_to_tsequenceset (const TSequence *seq)
 Return a temporal sequence transformed into a temporal sequence set. More...
 
TSequenceSettsequence_to_tsequenceset_free (TSequence *seq)
 Return a temporal sequence transformed into a temporal sequence set. More...
 
TSequenceSettsequence_to_tsequenceset_interp (const TSequence *seq, interpType interp)
 Return a temporal sequence transformed into a temporal sequence set. More...
 
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. More...
 
Datumtsequence_values_p (const TSequence *seq, int *count)
 Return the array of (pointer to the) distinct values of a temporal sequence. More...
 
TSequenceSettsequenceset_append_tinstant (TSequenceSet *ss, const TInstant *inst, double maxdist, const Interval *maxt, bool expand)
 Append an instant to a temporal sequence set. More...
 
TSequenceSettsequenceset_append_tsequence (TSequenceSet *ss, const TSequence *seq, bool expand)
 Append a sequence to a temporal sequence set. More...
 
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, equal, or greater than the second one. More...
 
TSequenceSettsequenceset_compact (const TSequenceSet *ss)
 Return a copy of a temporal sequence set without any extra storage space. More...
 
TSequenceSettsequenceset_copy (const TSequenceSet *ss)
 Return a copy of a temporal sequence set. More...
 
TSequenceSettsequenceset_delete_timestamptz (const TSequenceSet *ss, TimestampTz t)
 Delete a timestamptz from a temporal sequence set. More...
 
TSequenceSettsequenceset_delete_tstzset (const TSequenceSet *ss, const Set *s)
 Delete a timestamptz span from a temporal sequence set. More...
 
TSequenceSettsequenceset_delete_tstzspan (const TSequenceSet *ss, const Span *s)
 Delete a timestamptz span from a temporal sequence set. More...
 
TSequenceSettsequenceset_delete_tstzspanset (const TSequenceSet *ss, const SpanSet *ps)
 Delete a timestamptz span from a temporal sequence set. More...
 
Intervaltsequenceset_duration (const TSequenceSet *ss, bool boundspan)
 Return the duration of a temporal sequence set. More...
 
TimestampTz tsequenceset_end_timestamptz (const TSequenceSet *ss)
 Return the end timestamptz of a temporal sequence set. More...
 
bool tsequenceset_eq (const TSequenceSet *ss1, const TSequenceSet *ss2)
 Return true if two temporal sequence sets are equal. More...
 
void tsequenceset_expand_bbox (TSequenceSet *ss, const TSequence *seq)
 Expand the bounding box of a temporal sequence set with an additional sequence. More...
 
TSequenceSettsequenceset_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. More...
 
TSequenceSettsequenceset_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. More...
 
TSequenceSettsequenceset_from_mfjson (json_object *mfjson, bool spatial, int32_t srid, meosType temptype, interpType interp)
 Return a temporal sequence set from its MF-JSON representation. More...
 
uint32 tsequenceset_hash (const TSequenceSet *ss)
 Return the 32-bit hash value of a temporal sequence set. More...
 
TSequenceSettsequenceset_in (const char *str, meosType temptype, interpType interp)
 Return a temporal sequence set from its Well-Known Text (WKT) representation. More...
 
TSequenceSettsequenceset_insert (const TSequenceSet *ss1, const TSequenceSet *ss2)
 Insert the second temporal value into the first one. More...
 
const TInstanttsequenceset_inst_n (const TSequenceSet *ss, int n)
 Return a pointer to the n-th distinct instant of a temporal sequence set. More...
 
const TInstant ** tsequenceset_insts_p (const TSequenceSet *ss)
 Return an array of pointers to the instants of a temporal sequence set. More...
 
TSequenceSettsequenceset_make_exp (const TSequence **sequences, int count, int maxcount, bool normalize)
 Return a temporal sequence set from an array of temporal sequences. More...
 
TSequenceSettsequenceset_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 sequences after the creation. More...
 
const TInstanttsequenceset_max_inst (const TSequenceSet *ss)
 Return a pointer to the instant with maximum base value of a temporal sequence set. More...
 
Datum tsequenceset_max_val (const TSequenceSet *ss)
 Return (a pointer to) the maximum base value of a temporal sequence set. More...
 
TSequenceSettsequenceset_merge (const TSequenceSet *ss1, const TSequenceSet *ss2)
 Merge two temporal sequence sets. More...
 
TSequenceSettsequenceset_merge_array (const TSequenceSet **seqsets, int count)
 Merge an array of temporal sequence sets. More...
 
const TInstanttsequenceset_min_inst (const TSequenceSet *ss)
 Return a pointer to the instant with minimum base value of a temporal sequence set. More...
 
Datum tsequenceset_min_val (const TSequenceSet *ss)
 Return (a pointer to) the minimum base value of a temporal sequence set. More...
 
int tsequenceset_num_instants (const TSequenceSet *ss)
 Return the number of distinct instants of a temporal sequence set. More...
 
int tsequenceset_num_timestamps (const TSequenceSet *ss)
 Return the number of distinct timestamptz values of a temporal sequence set. More...
 
char * tsequenceset_out (const TSequenceSet *ss, int maxdd)
 Return the Well-Known Text (WKT) representation of a temporal sequence set. More...
 
void tsequenceset_restart (TSequenceSet *ss, int count)
 Return a temporal sequence set restared by keeping only the last n sequences. More...
 
TSequenceSettsequenceset_restrict_minmax (const TSequenceSet *ss, bool min, bool atfunc)
 Restrict a temporal sequence set to (the complement of) its minimum/maximum base value. More...
 
Temporaltsequenceset_restrict_timestamptz (const TSequenceSet *ss, TimestampTz t, bool atfunc)
 Restrict a temporal sequence set to (the complement of) a timestamptz. More...
 
Temporaltsequenceset_restrict_tstzset (const TSequenceSet *ss, const Set *s, bool atfunc)
 Restrict a temporal sequence set to (the complement of) a timestamptz set. More...
 
TSequenceSettsequenceset_restrict_tstzspan (const TSequenceSet *ss, const Span *s, bool atfunc)
 Restrict a temporal sequence set to (the complement of) a timestamptz span. More...
 
TSequenceSettsequenceset_restrict_tstzspanset (const TSequenceSet *ss, const SpanSet *ps, bool atfunc)
 Restrict a temporal sequence set to (the complement of) a timestamptz span set. More...
 
TSequenceSettsequenceset_restrict_value (const TSequenceSet *ss, Datum value, bool atfunc)
 Restrict a temporal sequence set to (the complement of) a base value. More...
 
TSequenceSettsequenceset_restrict_values (const TSequenceSet *ss, const Set *s, bool atfunc)
 Restrict a temporal sequence set to (the complement of) an array of base values. More...
 
TSequence ** tsequenceset_segments (const TSequenceSet *ss, int *count)
 Return the array of segments of a temporal sequence set. More...
 
const TSequence ** tsequenceset_sequences_p (const TSequenceSet *ss)
 Return an array of pointers to the sequences of a temporal sequence set. More...
 
void tsequenceset_set_bbox (const TSequenceSet *ss, void *box)
 Return in the last argument the bounding box of a temporal sequence set. More...
 
Temporaltsequenceset_set_interp (const TSequenceSet *ss, interpType interp)
 Return a temporal value transformed to the given interpolation. More...
 
void tsequenceset_set_tstzspan (const TSequenceSet *ss, Span *s)
 Return in the last argument the time span of a temporal sequence set. More...
 
TSequenceSettsequenceset_shift_scale_time (const TSequenceSet *ss, const Interval *start, const Interval *duration)
 Return a temporal sequence set shifted and/or scaled by two intervals. More...
 
TimestampTz tsequenceset_start_timestamptz (const TSequenceSet *ss)
 Return the start timestamptz of a temporal sequence set. More...
 
SpanSettsequenceset_time (const TSequenceSet *ss)
 Return the time frame a temporal sequence set as a timestamptz span set. More...
 
TimestampTztsequenceset_timestamps (const TSequenceSet *ss, int *count)
 Return the array of distinct timestamps of a temporal sequence set. More...
 
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. More...
 
TSequencetsequenceset_to_discrete (const TSequenceSet *ss)
 Return a temporal sequence set transformed into a temporal discrete sequence. More...
 
TSequenceSettsequenceset_to_linear (const TSequenceSet *ss)
 Return a temporal sequence set with continuous base type from step to linear interpolation. More...
 
TSequenceSettsequenceset_to_step (const TSequenceSet *ss)
 Return a temporal sequence set with continuous base type from linear to step interpolation. More...
 
TInstanttsequenceset_to_tinstant (const TSequenceSet *ss)
 Return a temporal sequence set transformed into a temporal instant. More...
 
TSequencetsequenceset_to_tsequence (const TSequenceSet *ss)
 Return a temporal sequence set transformed into a temporal sequence value. More...
 
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. More...
 
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. More...
 
Datumtsequenceset_values_p (const TSequenceSet *ss, int *count)
 Return the array of (pointers to the) distinct values of a temporal sequence set. More...
 
void tstzset_set_tbox (const Set *s, TBox *box)
 Return in the last argument a temporal box constructed from a timestamptz set. More...
 
void tstzspan_set_datespan (const Span *s1, Span *s2)
 Return the last span initialized with the first one transformed to a date span. More...
 
void tstzspan_set_tbox (const Span *s, TBox *box)
 Return in the last argument a temporal box constructed from a timestamptz span. More...
 
void tstzspanset_set_tbox (const SpanSet *ss, TBox *box)
 
TInstantttextinst_from_mfjson (json_object *mfjson)
 Return a temporal text instant from its MF-JSON representation. More...
 
TInstantttextinst_in (const char *str)
 Return a temporal text instant from its Well-Known Text (WKT) representation. More...
 
TSequencettextseq_from_mfjson (json_object *mfjson)
 Return a temporal text sequence from its MF-JSON representation. More...
 
TSequencettextseq_in (const char *str, interpType interp)
 Return a temporal text sequence from its Well-Known Text (WKT) representation. More...
 
TSequenceSetttextseqset_from_mfjson (json_object *mfjson)
 Return a temporal text sequence set from its MF-JSON representation. More...
 
TSequenceSetttextseqset_in (const char *str)
 Return a temporal text sequence set from its Well-Known Text (WKT) representation. More...
 
Setunion_set_value (const Set *s, Datum value)
 Return the union of a set and a value. More...
 
SpanSetunion_span_value (const Span *s, Datum value)
 Return the union of a span and a value. More...
 
SpanSetunion_spanset_value (const SpanSet *ss, Datum value)
 Return the union of a span set and a value. More...
 
Setunion_value_set (Datum value, const Set *s)
 Return the union of a value and a set. More...
 
SpanSetunion_value_span (Datum value, const Span *s)
 Return the union of a value and a span. More...
 
SpanSetunion_value_spanset (Datum value, const SpanSet *ss)
 Return the union of a value and a span set. More...
 
Setvalue_set (Datum d, meosType basetype)
 Convert a value into a set. More...
 
void value_set_span (Datum value, meosType basetype, Span *s)
 Return in the last argument a span constructed from a value. More...
 
Spanvalue_span (Datum d, meosType basetype)
 Convert a value into a span. More...
 
SpanSetvalue_spanset (Datum d, meosType basetype)
 Convert a value into a span set. More...
 
Setvalue_union_transfn (Set *state, Datum value, meosType basetype)
 Transition function for set union aggregate of values. More...