MobilityDB 1.3
Loading...
Searching...
No Matches
meos.h
Go to the documentation of this file.
1/*****************************************************************************
2 *
3 * This MobilityDB code is provided under The PostgreSQL License.
4 * Copyright (c) 2016-2025, Université libre de Bruxelles and MobilityDB
5 * contributors
6 *
7 * MobilityDB includes portions of PostGIS version 3 source code released
8 * under the GNU General Public License (GPLv2 or later).
9 * Copyright (c) 2001-2025, PostGIS contributors
10 *
11 * Permission to use, copy, modify, and distribute this software and its
12 * documentation for any purpose, without fee, and without a written
13 * agreement is hereby granted, provided that the above copyright notice and
14 * this paragraph and the following two paragraphs appear in all copies.
15 *
16 * IN NO EVENT SHALL UNIVERSITE LIBRE DE BRUXELLES BE LIABLE TO ANY PARTY FOR
17 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
18 * LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION,
19 * EVEN IF UNIVERSITE LIBRE DE BRUXELLES HAS BEEN ADVISED OF THE POSSIBILITY
20 * OF SUCH DAMAGE.
21 *
22 * UNIVERSITE LIBRE DE BRUXELLES SPECIFICALLY DISCLAIMS ANY WARRANTIES,
23 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
24 * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON
25 * AN "AS IS" BASIS, AND UNIVERSITE LIBRE DE BRUXELLES HAS NO OBLIGATIONS TO
26 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
27 *
28 *****************************************************************************/
29
35#ifndef __MEOS_H__
36#define __MEOS_H__
37
38/* C */
39#include <stdbool.h>
40#include <stddef.h>
41#include <stdint.h>
42/* PostgreSQL */
43#if MEOS
44#include "postgres_int_defs.h"
45#else
46#include <postgres.h>
47#include <utils/date.h>
48#include <utils/timestamp.h>
49#endif
50
51/*****************************************************************************
52 * Toolchain dependent definitions
53 *****************************************************************************/
54
55#ifdef _MSC_VER
56/*
57 * Under MSVC, functions exported by a loadable module must be marked
58 * "dllexport". Other compilers don't need that.
59 * Borrowed from PostgreSQL file win32.h
60 */
61#define PGDLLEXPORT __declspec (dllexport)
62/*
63 * Avoids warning C4996: 'strdup': The POSIX name for this item is deprecated.
64 */
65#define strdup _strdup
66#endif
67
68/*
69 * Thread-local storage qualifier (MEOS_TLS) used internally by MEOS to
70 * make per-thread state (last-error number, PROJ context, SRS cache,
71 * ways cache, RNG, session timezone) safe under multithreading. Defined
72 * in a stand-alone header so that vendored PostgreSQL files can pick it
73 * up without pulling in the full meos.h.
74 */
75#include "meos_tls.h"
76
77/*****************************************************************************
78 * Type definitions
79 *****************************************************************************/
80
84#define DOUBLE_PAD(size) ( (size) + ((size) % 8 ? (8 - (size) % 8) : 0 ) )
85
89typedef struct
90{
98} Set;
99
103typedef struct
104{
109 char padding[4];
112} Span;
113
117typedef struct
118{
123 char padding;
127 Span elems[1];
128} SpanSet;
129
133typedef struct
134{
138} TBox;
139
143typedef struct
144{
146 double xmin;
147 double ymin;
148 double zmin;
149 double xmax;
150 double ymax;
151 double zmax;
152 int32_t srid;
154} STBox;
155
159typedef enum
160{
166
170typedef enum
171{
174 STEP = 2,
176} interpType;
177
182typedef struct
183{
188 /* variable-length data follows */
189} Temporal;
190
194typedef struct
195{
205 /* variable-length data follows */
206} TInstant;
207
211typedef struct
212{
220 char padding[6];
225 /* variable-length data follows */
226} TSequence;
227
228#define TSEQUENCE_BBOX_PTR(seq) ((void *)(&(seq)->period))
229
233typedef struct
234{
249 /* variable-length data follows */
251
252#define TSEQUENCESET_BBOX_PTR(ss) ((void *)(&(ss)->period))
253
257typedef struct
258{
259 int i;
260 int j;
261} Match;
262
263/*****************************************************************************/
264
268typedef struct SkipList SkipList;
269
270/*****************************************************************************/
271
275typedef struct MeosArray MeosArray;
276
277/* MeosArray functions */
278
280extern void meos_array_add(MeosArray *array, void *value);
281extern void *meos_array_get(const MeosArray *array, int n);
282extern int meos_array_count(const MeosArray *array);
283extern void meos_array_reset(MeosArray *array);
284extern void meos_array_reset_free(MeosArray *array);
285extern void meos_array_destroy(MeosArray *array);
286extern void meos_array_destroy_free(MeosArray *array);
287
288/*****************************************************************************/
289
293typedef enum
294{
299
303typedef struct RTree RTree;
304
305/* RTree functions */
306
312extern RTree *rtree_create_tbox();
313extern RTree *rtree_create_stbox();
314extern void rtree_free(RTree *rtree);
315extern void rtree_insert(RTree *rtree, void *box, int id);
316extern void rtree_insert_temporal(RTree *rtree, const Temporal *temp, int id);
317extern int rtree_search(const RTree *rtree, RTreeSearchOp op, const void *query, MeosArray *result);
318extern int rtree_search_temporal(const RTree *rtree, RTreeSearchOp op, const Temporal *temp, MeosArray *result);
319
320/*****************************************************************************
321 * Error codes
322 *****************************************************************************/
323
324typedef enum
325{
326 MEOS_SUCCESS = 0, // Successful operation
327
328 MEOS_ERR_INTERNAL_ERROR = 1, // Unspecified internal error
329 MEOS_ERR_INTERNAL_TYPE_ERROR = 2, // Internal type error
330 MEOS_ERR_VALUE_OUT_OF_RANGE = 3, // Internal out of range error
331 MEOS_ERR_DIVISION_BY_ZERO = 4, // Internal division by zero error
332 MEOS_ERR_MEMORY_ALLOC_ERROR = 5, // Internal malloc error
333 MEOS_ERR_AGGREGATION_ERROR = 6, // Internal aggregation error
334 MEOS_ERR_DIRECTORY_ERROR = 7, // Internal directory error
335 MEOS_ERR_FILE_ERROR = 8, // Internal file error
336
337 MEOS_ERR_INVALID_ARG = 10, // Invalid argument
338 MEOS_ERR_INVALID_ARG_TYPE = 11, // Invalid argument type
339 MEOS_ERR_INVALID_ARG_VALUE = 12, // Invalid argument value
340 MEOS_ERR_FEATURE_NOT_SUPPORTED = 13, // Feature not currently supported
341
342 MEOS_ERR_MFJSON_INPUT = 20, // MFJSON input error
343 MEOS_ERR_MFJSON_OUTPUT = 21, // MFJSON output error
344 MEOS_ERR_TEXT_INPUT = 22, // Text input error
345 MEOS_ERR_TEXT_OUTPUT = 23, // Text output error
346 MEOS_ERR_WKB_INPUT = 24, // WKB input error
347 MEOS_ERR_WKB_OUTPUT = 25, // WKB output error
348 MEOS_ERR_GEOJSON_INPUT = 26, // GEOJSON input error
349 MEOS_ERR_GEOJSON_OUTPUT = 27, // GEOJSON output error
350
351} errorCode;
352
353extern void meos_error(int errlevel, int errcode, const char *format, ...);
354
355/* Set or read error level */
356
357extern int meos_errno(void);
358extern int meos_errno_set(int err);
359extern int meos_errno_restore(int err);
360extern int meos_errno_reset(void);
361
362/*****************************************************************************
363 * Initialization of the MEOS library
364 *
365 * Multithreading
366 * --------------
367 * The MEOS state managed by these functions is per-thread. Each thread
368 * that calls into MEOS must call `meos_initialize()` before its first
369 * MEOS call and `meos_finalize()` before exiting; the PROJ context, SRS
370 * cache, ways cache, RNGs, last-error number (`meos_errno`), and
371 * session timezone are all thread-local.
372 *
373 * The error handler set by `meos_initialize_error_handler()` is the
374 * one exception: it is process-global and should be installed once
375 * before workers are spawned.
376 *****************************************************************************/
377
378/* Definition of error handler function */
379typedef void (*error_handler_fn)(int, int, const char *);
380
381extern void meos_initialize_timezone(const char *name);
382extern void meos_initialize_error_handler(error_handler_fn err_handler);
383extern void meos_finalize_timezone(void);
384extern void meos_finalize_projsrs(void);
385extern void meos_finalize_ways(void);
386
387extern bool meos_set_datestyle(const char *newval, void *extra);
388extern bool meos_set_intervalstyle(const char *newval, int extra);
389extern char *meos_get_datestyle(void);
390extern char *meos_get_intervalstyle(void);
391
392extern void meos_set_spatial_ref_sys_csv(const char* path);
393
394extern void meos_initialize(void);
395extern void meos_finalize(void);
396
397/******************************************************************************
398 * Functions for base and time types
399 ******************************************************************************/
400
401extern DateADT add_date_int(DateADT d, int32 days);
402extern Interval *add_interval_interval(const Interval *interv1, const Interval *interv2);
404extern bool bool_in(const char *str);
405extern char *bool_out(bool b);
406extern text *cstring2text(const char *str);
407extern Timestamp date_to_timestamp(DateADT dateVal);
409extern double float_exp(double d);
410extern double float_ln(double d);
411extern double float_log10(double d);
412extern char *float8_out(double d, int maxdd);
413extern double float_round(double d, int maxdd);
414extern int int32_cmp(int32 l, int32 r);
415extern int int64_cmp(int64 l, int64 r);
416extern Interval *interval_make(int32 years, int32 months, int32 weeks, int32 days, int32 hours, int32 mins, double secs);
417extern int minus_date_date(DateADT d1, DateADT d2);
418extern DateADT minus_date_int(DateADT d, int32 days);
421extern Interval *mul_interval_double(const Interval *interv, double factor);
422extern DateADT pg_date_in(const char *str);
423extern char *pg_date_out(DateADT d);
424extern int pg_interval_cmp(const Interval *interv1, const Interval *interv2);
425extern Interval *pg_interval_in(const char *str, int32 typmod);
426extern char *pg_interval_out(const Interval *interv);
427extern Timestamp pg_timestamp_in(const char *str, int32 typmod);
428extern char *pg_timestamp_out(Timestamp t);
429extern TimestampTz pg_timestamptz_in(const char *str, int32 typmod);
430extern char *pg_timestamptz_out(TimestampTz t);
431extern char *text2cstring(const text *txt);
432extern int text_cmp(const text *txt1, const text *txt2);
433extern text *text_copy(const text *txt);
434extern text *text_in(const char *str);
435extern text *text_initcap(const text *txt);
436extern text *text_lower(const text *txt);
437extern char *text_out(const text *txt);
438extern text *text_upper(const text *txt);
439extern text *textcat_text_text(const text *txt1, const text *txt2);
440extern TimestampTz timestamptz_shift(TimestampTz t, const Interval *interv);
443
444/*============================================================================
445 * Functions for set and span types
446 ===========================================================================*/
447
448/*****************************************************************************
449 * Input/output functions for set and span types
450 *****************************************************************************/
451
452extern Set *bigintset_in(const char *str);
453extern char *bigintset_out(const Set *set);
454extern Span *bigintspan_expand(const Span *s, int64 value);
455extern Span *bigintspan_in(const char *str);
456extern char *bigintspan_out(const Span *s);
457extern SpanSet *bigintspanset_in(const char *str);
458extern char *bigintspanset_out(const SpanSet *ss);
459extern Set *dateset_in(const char *str);
460extern char *dateset_out(const Set *s);
461extern Span *datespan_in(const char *str);
462extern char *datespan_out(const Span *s);
463extern SpanSet *datespanset_in(const char *str);
464extern char *datespanset_out(const SpanSet *ss);
465extern Set *floatset_in(const char *str);
466extern char *floatset_out(const Set *set, int maxdd);
467extern Span *floatspan_expand(const Span *s, double value);
468extern Span *floatspan_in(const char *str);
469extern char *floatspan_out(const Span *s, int maxdd);
470extern SpanSet *floatspanset_in(const char *str);
471extern char *floatspanset_out(const SpanSet *ss, int maxdd);
472extern Set *intset_in(const char *str);
473extern char *intset_out(const Set *set);
474extern Span *intspan_expand(const Span *s, int32 value);
475extern Span *intspan_in(const char *str);
476extern char *intspan_out(const Span *s);
477extern SpanSet *intspanset_in(const char *str);
478extern char *intspanset_out(const SpanSet *ss);
479extern char *set_as_hexwkb(const Set *s, uint8_t variant, size_t *size_out);
480extern uint8_t *set_as_wkb(const Set *s, uint8_t variant, size_t *size_out);
481extern Set *set_from_hexwkb(const char *hexwkb);
482extern Set *set_from_wkb(const uint8_t *wkb, size_t size);
483extern char *span_as_hexwkb(const Span *s, uint8_t variant, size_t *size_out);
484extern uint8_t *span_as_wkb(const Span *s, uint8_t variant, size_t *size_out);
485extern Span *span_from_hexwkb(const char *hexwkb);
486extern Span *span_from_wkb(const uint8_t *wkb, size_t size);
487extern char *spanset_as_hexwkb(const SpanSet *ss, uint8_t variant, size_t *size_out);
488extern uint8_t *spanset_as_wkb(const SpanSet *ss, uint8_t variant, size_t *size_out);
489extern SpanSet *spanset_from_hexwkb(const char *hexwkb);
490extern SpanSet *spanset_from_wkb(const uint8_t *wkb, size_t size);
491extern Set *textset_in(const char *str);
492extern char *textset_out(const Set *set);
493extern Set *tstzset_in(const char *str);
494extern char *tstzset_out(const Set *set);
495extern Span *tstzspan_in(const char *str);
496extern char *tstzspan_out(const Span *s);
497extern SpanSet *tstzspanset_in(const char *str);
498extern char *tstzspanset_out(const SpanSet *ss);
499
500/*****************************************************************************
501 * Constructor functions for set and span types
502 *****************************************************************************/
503
504extern Set *bigintset_make(const int64 *values, int count);
505extern Span *bigintspan_make(int64 lower, int64 upper, bool lower_inc, bool upper_inc);
506extern Set *dateset_make(const DateADT *values, int count);
507extern Span *datespan_make(DateADT lower, DateADT upper, bool lower_inc, bool upper_inc);
508extern Set *floatset_make(const double *values, int count);
509extern Span *floatspan_make(double lower, double upper, bool lower_inc, bool upper_inc);
510extern Set *intset_make(const int *values, int count);
511extern Span *intspan_make(int lower, int upper, bool lower_inc, bool upper_inc);
512extern Set *set_copy(const Set *s);
513extern Span *span_copy(const Span *s);
514extern SpanSet *spanset_copy(const SpanSet *ss);
515extern SpanSet *spanset_make(Span *spans, int count);
516extern Set *textset_make(text **values, int count);
517extern Set *tstzset_make(const TimestampTz *values, int count);
518extern Span *tstzspan_make(TimestampTz lower, TimestampTz upper, bool lower_inc, bool upper_inc);
519
520/*****************************************************************************
521 * Conversion functions for set and span types
522 *****************************************************************************/
523
524extern Set *bigint_to_set(int64 i);
525extern Span *bigint_to_span(int i);
526extern SpanSet *bigint_to_spanset(int i);
527extern Set *date_to_set(DateADT d);
528extern Span *date_to_span(DateADT d);
530extern Set *dateset_to_tstzset(const Set *s);
531extern Span *datespan_to_tstzspan(const Span *s);
533extern Set *float_to_set(double d);
534extern Span *float_to_span(double d);
535extern SpanSet *float_to_spanset(double d);
536extern Set *floatset_to_intset(const Set *s);
537extern Span *floatspan_to_intspan(const Span *s);
539extern Set *int_to_set(int i);
540extern Span *int_to_span(int i);
541extern SpanSet *int_to_spanset(int i);
542extern Set *intset_to_floatset(const Set *s);
543extern Span *intspan_to_floatspan(const Span *s);
545extern Span *set_to_span(const Set *s);
546extern SpanSet *set_to_spanset(const Set *s);
547extern SpanSet *span_to_spanset(const Span *s);
548extern Set *text_to_set(const text *txt);
552extern Set *tstzset_to_dateset(const Set *s);
553extern Span *tstzspan_to_datespan(const Span *s);
555
556/*****************************************************************************
557 * Accessor functions for set and span types
558 *****************************************************************************/
559
560extern int64 bigintset_end_value(const Set *s);
561extern int64 bigintset_start_value(const Set *s);
562extern bool bigintset_value_n(const Set *s, int n, int64 *result);
563extern int64 *bigintset_values(const Set *s);
564extern int64 bigintspan_lower(const Span *s);
565extern int64 bigintspan_upper(const Span *s);
566extern int64 bigintspan_width(const Span *s);
567extern int64 bigintspanset_lower(const SpanSet *ss);
568extern int64 bigintspanset_upper(const SpanSet *ss);
569extern int64 bigintspanset_width(const SpanSet *ss, bool boundspan);
570extern DateADT dateset_end_value(const Set *s);
571extern DateADT dateset_start_value(const Set *s);
572extern bool dateset_value_n(const Set *s, int n, DateADT *result);
573extern DateADT *dateset_values(const Set *s);
574extern Interval *datespan_duration(const Span *s);
575extern DateADT datespan_lower(const Span *s);
576extern DateADT datespan_upper(const Span *s);
577extern bool datespanset_date_n(const SpanSet *ss, int n, DateADT *result);
578extern Set *datespanset_dates(const SpanSet *ss);
579extern Interval *datespanset_duration(const SpanSet *ss, bool boundspan);
580extern DateADT datespanset_end_date(const SpanSet *ss);
581extern int datespanset_num_dates(const SpanSet *ss);
582extern DateADT datespanset_start_date(const SpanSet *ss);
583extern double floatset_end_value(const Set *s);
584extern double floatset_start_value(const Set *s);
585extern bool floatset_value_n(const Set *s, int n, double *result);
586extern double *floatset_values(const Set *s);
587extern double floatspan_lower(const Span *s);
588extern double floatspan_upper(const Span *s);
589extern double floatspan_width(const Span *s);
590extern double floatspanset_lower(const SpanSet *ss);
591extern double floatspanset_upper(const SpanSet *ss);
592extern double floatspanset_width(const SpanSet *ss, bool boundspan);
593extern int intset_end_value(const Set *s);
594extern int intset_start_value(const Set *s);
595extern bool intset_value_n(const Set *s, int n, int *result);
596extern int *intset_values(const Set *s);
597extern int intspan_lower(const Span *s);
598extern int intspan_upper(const Span *s);
599extern int intspan_width(const Span *s);
600extern int intspanset_lower(const SpanSet *ss);
601extern int intspanset_upper(const SpanSet *ss);
602extern int intspanset_width(const SpanSet *ss, bool boundspan);
603extern uint32 set_hash(const Set *s);
604extern uint64 set_hash_extended(const Set *s, uint64 seed);
605extern int set_num_values(const Set *s);
606extern uint32 span_hash(const Span *s);
607extern uint64 span_hash_extended(const Span *s, uint64 seed);
608extern bool span_lower_inc(const Span *s);
609extern bool span_upper_inc(const Span *s);
610extern Span *spanset_end_span(const SpanSet *ss);
611extern uint32 spanset_hash(const SpanSet *ss);
612extern uint64 spanset_hash_extended(const SpanSet *ss, uint64 seed);
613extern bool spanset_lower_inc(const SpanSet *ss);
614extern int spanset_num_spans(const SpanSet *ss);
615extern Span *spanset_span(const SpanSet *ss);
616extern Span *spanset_span_n(const SpanSet *ss, int i);
617extern Span **spanset_spanarr(const SpanSet *ss);
618extern Span *spanset_start_span(const SpanSet *ss);
619extern bool spanset_upper_inc(const SpanSet *ss);
620extern text *textset_end_value(const Set *s);
621extern text *textset_start_value(const Set *s);
622extern bool textset_value_n(const Set *s, int n, text **result);
623extern text **textset_values(const Set *s);
624extern TimestampTz tstzset_end_value(const Set *s);
625extern TimestampTz tstzset_start_value(const Set *s);
626extern bool tstzset_value_n(const Set *s, int n, TimestampTz *result);
627extern TimestampTz *tstzset_values(const Set *s);
628extern Interval *tstzspan_duration(const Span *s);
629extern TimestampTz tstzspan_lower(const Span *s);
630extern TimestampTz tstzspan_upper(const Span *s);
631extern Interval *tstzspanset_duration(const SpanSet *ss, bool boundspan);
633extern TimestampTz tstzspanset_lower(const SpanSet *ss);
634extern int tstzspanset_num_timestamps(const SpanSet *ss);
636extern Set *tstzspanset_timestamps(const SpanSet *ss);
637extern bool tstzspanset_timestamptz_n(const SpanSet *ss, int n, TimestampTz *result);
638extern TimestampTz tstzspanset_upper(const SpanSet *ss);
639
640/*****************************************************************************
641 * Transformation functions for set and span types
642 *****************************************************************************/
643
644extern Set *bigintset_shift_scale(const Set *s, int64 shift, int64 width, bool hasshift, bool haswidth);
645extern Span *bigintspan_shift_scale(const Span *s, int64 shift, int64 width, bool hasshift, bool haswidth);
646extern SpanSet *bigintspanset_shift_scale(const SpanSet *ss, int64 shift, int64 width, bool hasshift, bool haswidth);
647extern Set *dateset_shift_scale(const Set *s, int shift, int width, bool hasshift, bool haswidth);
648extern Span *datespan_shift_scale(const Span *s, int shift, int width, bool hasshift, bool haswidth);
649extern SpanSet *datespanset_shift_scale(const SpanSet *ss, int shift, int width, bool hasshift, bool haswidth);
650extern Set *floatset_ceil(const Set *s);
651extern Set *floatset_degrees(const Set *s, bool normalize);
652extern Set *floatset_floor(const Set *s);
653extern Set *floatset_radians(const Set *s);
654extern Set *floatset_shift_scale(const Set *s, double shift, double width, bool hasshift, bool haswidth);
655extern Span *floatspan_ceil(const Span *s);
656extern Span *floatspan_degrees(const Span *s, bool normalize);
657extern Span *floatspan_floor(const Span *s);
658extern Span *floatspan_radians(const Span *s);
659extern Span *floatspan_round(const Span *s, int maxdd);
660extern Span *floatspan_shift_scale(const Span *s, double shift, double width, bool hasshift, bool haswidth);
661extern SpanSet *floatspanset_ceil(const SpanSet *ss);
662extern SpanSet *floatspanset_floor(const SpanSet *ss);
663extern SpanSet *floatspanset_degrees(const SpanSet *ss, bool normalize);
664extern SpanSet *floatspanset_radians(const SpanSet *ss);
665extern SpanSet *floatspanset_round(const SpanSet *ss, int maxdd);
666extern SpanSet *floatspanset_shift_scale(const SpanSet *ss, double shift, double width, bool hasshift, bool haswidth);
667extern Set *intset_shift_scale(const Set *s, int shift, int width, bool hasshift, bool haswidth);
668extern Span *intspan_shift_scale(const Span *s, int shift, int width, bool hasshift, bool haswidth);
669extern SpanSet *intspanset_shift_scale(const SpanSet *ss, int shift, int width, bool hasshift, bool haswidth);
670extern Span *tstzspan_expand(const Span *s, const Interval *interv);
671extern Set *set_round(const Set *s, int maxdd);
672extern Set *textcat_text_textset(const text *txt, const Set *s);
673extern Set *textcat_textset_text(const Set *s, const text *txt);
674extern Set *textset_initcap(const Set *s);
675extern Set *textset_lower(const Set *s);
676extern Set *textset_upper(const Set *s);
677extern TimestampTz timestamptz_tprecision(TimestampTz t, const Interval *duration, TimestampTz torigin);
678extern Set *tstzset_shift_scale(const Set *s, const Interval *shift, const Interval *duration);
679extern Set *tstzset_tprecision(const Set *s, const Interval *duration, TimestampTz torigin);
680extern Span *tstzspan_shift_scale(const Span *s, const Interval *shift, const Interval *duration);
681extern Span *tstzspan_tprecision(const Span *s, const Interval *duration, TimestampTz torigin);
682extern SpanSet *tstzspanset_shift_scale(const SpanSet *ss, const Interval *shift, const Interval *duration);
683extern SpanSet *tstzspanset_tprecision(const SpanSet *ss, const Interval *duration, TimestampTz torigin);
684
685/*****************************************************************************
686 * Comparison functions for set and span types
687 *****************************************************************************/
688
689extern int set_cmp(const Set *s1, const Set *s2);
690extern bool set_eq(const Set *s1, const Set *s2);
691extern bool set_ge(const Set *s1, const Set *s2);
692extern bool set_gt(const Set *s1, const Set *s2);
693extern bool set_le(const Set *s1, const Set *s2);
694extern bool set_lt(const Set *s1, const Set *s2);
695extern bool set_ne(const Set *s1, const Set *s2);
696extern int span_cmp(const Span *s1, const Span *s2);
697extern bool span_eq(const Span *s1, const Span *s2);
698extern bool span_ge(const Span *s1, const Span *s2);
699extern bool span_gt(const Span *s1, const Span *s2);
700extern bool span_le(const Span *s1, const Span *s2);
701extern bool span_lt(const Span *s1, const Span *s2);
702extern bool span_ne(const Span *s1, const Span *s2);
703extern int spanset_cmp(const SpanSet *ss1, const SpanSet *ss2);
704extern bool spanset_eq(const SpanSet *ss1, const SpanSet *ss2);
705extern bool spanset_ge(const SpanSet *ss1, const SpanSet *ss2);
706extern bool spanset_gt(const SpanSet *ss1, const SpanSet *ss2);
707extern bool spanset_le(const SpanSet *ss1, const SpanSet *ss2);
708extern bool spanset_lt(const SpanSet *ss1, const SpanSet *ss2);
709extern bool spanset_ne(const SpanSet *ss1, const SpanSet *ss2);
710
711/*****************************************************************************
712 * Bounding box functions for set and span types
713 *****************************************************************************/
714
715/* Split functions */
716
717extern Span *set_spans(const Set *s);
718extern Span *set_split_each_n_spans(const Set *s, int elems_per_span, int *count);
719extern Span *set_split_n_spans(const Set *s, int span_count, int *count);
720extern Span *spanset_spans(const SpanSet *ss);
721extern Span *spanset_split_each_n_spans(const SpanSet *ss, int elems_per_span, int *count);
722extern Span *spanset_split_n_spans(const SpanSet *ss, int span_count, int *count);
723
724/* Topological functions */
725
726extern bool adjacent_span_bigint(const Span *s, int64 i);
727extern bool adjacent_span_date(const Span *s, DateADT d);
728extern bool adjacent_span_float(const Span *s, double d);
729extern bool adjacent_span_int(const Span *s, int i);
730extern bool adjacent_span_span(const Span *s1, const Span *s2);
731extern bool adjacent_span_spanset(const Span *s, const SpanSet *ss);
732extern bool adjacent_span_timestamptz(const Span *s, TimestampTz t);
733extern bool adjacent_spanset_bigint(const SpanSet *ss, int64 i);
734extern bool adjacent_spanset_date(const SpanSet *ss, DateADT d);
735extern bool adjacent_spanset_float(const SpanSet *ss, double d);
736extern bool adjacent_spanset_int(const SpanSet *ss, int i);
737extern bool adjacent_spanset_timestamptz(const SpanSet *ss, TimestampTz t);
738extern bool adjacent_spanset_span(const SpanSet *ss, const Span *s);
739extern bool adjacent_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2);
740extern bool contained_bigint_set(int64 i, const Set *s);
741extern bool contained_bigint_span(int64 i, const Span *s);
742extern bool contained_bigint_spanset(int64 i, const SpanSet *ss);
743extern bool contained_date_set(DateADT d, const Set *s);
744extern bool contained_date_span(DateADT d, const Span *s);
745extern bool contained_date_spanset(DateADT d, const SpanSet *ss);
746extern bool contained_float_set(double d, const Set *s);
747extern bool contained_float_span(double d, const Span *s);
748extern bool contained_float_spanset(double d, const SpanSet *ss);
749extern bool contained_int_set(int i, const Set *s);
750extern bool contained_int_span(int i, const Span *s);
751extern bool contained_int_spanset(int i, const SpanSet *ss);
752extern bool contained_set_set(const Set *s1, const Set *s2);
753extern bool contained_span_span(const Span *s1, const Span *s2);
754extern bool contained_span_spanset(const Span *s, const SpanSet *ss);
755extern bool contained_spanset_span(const SpanSet *ss, const Span *s);
756extern bool contained_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2);
757extern bool contained_text_set(const text *txt, const Set *s);
758extern bool contained_timestamptz_set(TimestampTz t, const Set *s);
759extern bool contained_timestamptz_span(TimestampTz t, const Span *s);
760extern bool contained_timestamptz_spanset(TimestampTz t, const SpanSet *ss);
761extern bool contains_set_bigint(const Set *s, int64 i);
762extern bool contains_set_date(const Set *s, DateADT d);
763extern bool contains_set_float(const Set *s, double d);
764extern bool contains_set_int(const Set *s, int i);
765extern bool contains_set_set(const Set *s1, const Set *s2);
766extern bool contains_set_text(const Set *s, text *t);
767extern bool contains_set_timestamptz(const Set *s, TimestampTz t);
768extern bool contains_span_bigint(const Span *s, int64 i);
769extern bool contains_span_date(const Span *s, DateADT d);
770extern bool contains_span_float(const Span *s, double d);
771extern bool contains_span_int(const Span *s, int i);
772extern bool contains_span_span(const Span *s1, const Span *s2);
773extern bool contains_span_spanset(const Span *s, const SpanSet *ss);
774extern bool contains_span_timestamptz(const Span *s, TimestampTz t);
775extern bool contains_spanset_bigint(const SpanSet *ss, int64 i);
776extern bool contains_spanset_date(const SpanSet *ss, DateADT d);
777extern bool contains_spanset_float(const SpanSet *ss, double d);
778extern bool contains_spanset_int(const SpanSet *ss, int i);
779extern bool contains_spanset_span(const SpanSet *ss, const Span *s);
780extern bool contains_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2);
781extern bool contains_spanset_timestamptz(const SpanSet *ss, TimestampTz t);
782extern bool overlaps_set_set(const Set *s1, const Set *s2);
783extern bool overlaps_span_span(const Span *s1, const Span *s2);
784extern bool overlaps_span_spanset(const Span *s, const SpanSet *ss);
785extern bool overlaps_spanset_span(const SpanSet *ss, const Span *s);
786extern bool overlaps_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2);
787
788/*****************************************************************************/
789
790/* Position functions for set and span types */
791
792extern bool after_date_set(DateADT d, const Set *s);
793extern bool after_date_span(DateADT d, const Span *s);
794extern bool after_date_spanset(DateADT d, const SpanSet *ss);
795extern bool after_set_date(const Set *s, DateADT d);
796extern bool after_set_timestamptz(const Set *s, TimestampTz t);
797extern bool after_span_date(const Span *s, DateADT d);
798extern bool after_span_timestamptz(const Span *s, TimestampTz t);
799extern bool after_spanset_date(const SpanSet *ss, DateADT d);
800extern bool after_spanset_timestamptz(const SpanSet *ss, TimestampTz t);
801extern bool after_timestamptz_set(TimestampTz t, const Set *s);
802extern bool after_timestamptz_span(TimestampTz t, const Span *s);
803extern bool after_timestamptz_spanset(TimestampTz t, const SpanSet *ss);
804extern bool before_date_set(DateADT d, const Set *s);
805extern bool before_date_span(DateADT d, const Span *s);
806extern bool before_date_spanset(DateADT d, const SpanSet *ss);
807extern bool before_set_date(const Set *s, DateADT d);
808extern bool before_set_timestamptz(const Set *s, TimestampTz t);
809extern bool before_span_date(const Span *s, DateADT d);
810extern bool before_span_timestamptz(const Span *s, TimestampTz t);
811extern bool before_spanset_date(const SpanSet *ss, DateADT d);
812extern bool before_spanset_timestamptz(const SpanSet *ss, TimestampTz t);
813extern bool before_timestamptz_set(TimestampTz t, const Set *s);
814extern bool before_timestamptz_span(TimestampTz t, const Span *s);
815extern bool before_timestamptz_spanset(TimestampTz t, const SpanSet *ss);
816extern bool left_bigint_set(int64 i, const Set *s);
817extern bool left_bigint_span(int64 i, const Span *s);
818extern bool left_bigint_spanset(int64 i, const SpanSet *ss);
819extern bool left_float_set(double d, const Set *s);
820extern bool left_float_span(double d, const Span *s);
821extern bool left_float_spanset(double d, const SpanSet *ss);
822extern bool left_int_set(int i, const Set *s);
823extern bool left_int_span(int i, const Span *s);
824extern bool left_int_spanset(int i, const SpanSet *ss);
825extern bool left_set_bigint(const Set *s, int64 i);
826extern bool left_set_float(const Set *s, double d);
827extern bool left_set_int(const Set *s, int i);
828extern bool left_set_set(const Set *s1, const Set *s2);
829extern bool left_set_text(const Set *s, text *txt);
830extern bool left_span_bigint(const Span *s, int64 i);
831extern bool left_span_float(const Span *s, double d);
832extern bool left_span_int(const Span *s, int i);
833extern bool left_span_span(const Span *s1, const Span *s2);
834extern bool left_span_spanset(const Span *s, const SpanSet *ss);
835extern bool left_spanset_bigint(const SpanSet *ss, int64 i);
836extern bool left_spanset_float(const SpanSet *ss, double d);
837extern bool left_spanset_int(const SpanSet *ss, int i);
838extern bool left_spanset_span(const SpanSet *ss, const Span *s);
839extern bool left_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2);
840extern bool left_text_set(const text *txt, const Set *s);
841extern bool overafter_date_set(DateADT d, const Set *s);
842extern bool overafter_date_span(DateADT d, const Span *s);
843extern bool overafter_date_spanset(DateADT d, const SpanSet *ss);
844extern bool overafter_set_date(const Set *s, DateADT d);
845extern bool overafter_set_timestamptz(const Set *s, TimestampTz t);
846extern bool overafter_span_date(const Span *s, DateADT d);
847extern bool overafter_span_timestamptz(const Span *s, TimestampTz t);
848extern bool overafter_spanset_date(const SpanSet *ss, DateADT d);
849extern bool overafter_spanset_timestamptz(const SpanSet *ss, TimestampTz t);
850extern bool overafter_timestamptz_set(TimestampTz t, const Set *s);
851extern bool overafter_timestamptz_span(TimestampTz t, const Span *s);
852extern bool overafter_timestamptz_spanset(TimestampTz t, const SpanSet *ss);
853extern bool overbefore_date_set(DateADT d, const Set *s);
854extern bool overbefore_date_span(DateADT d, const Span *s);
855extern bool overbefore_date_spanset(DateADT d, const SpanSet *ss);
856extern bool overbefore_set_date(const Set *s, DateADT d);
857extern bool overbefore_set_timestamptz(const Set *s, TimestampTz t);
858extern bool overbefore_span_date(const Span *s, DateADT d);
859extern bool overbefore_span_timestamptz(const Span *s, TimestampTz t);
860extern bool overbefore_spanset_date(const SpanSet *ss, DateADT d);
861extern bool overbefore_spanset_timestamptz(const SpanSet *ss, TimestampTz t);
862extern bool overbefore_timestamptz_set(TimestampTz t, const Set *s);
863extern bool overbefore_timestamptz_span(TimestampTz t, const Span *s);
864extern bool overbefore_timestamptz_spanset(TimestampTz t, const SpanSet *ss);
865extern bool overleft_bigint_set(int64 i, const Set *s);
866extern bool overleft_bigint_span(int64 i, const Span *s);
867extern bool overleft_bigint_spanset(int64 i, const SpanSet *ss);
868extern bool overleft_float_set(double d, const Set *s);
869extern bool overleft_float_span(double d, const Span *s);
870extern bool overleft_float_spanset(double d, const SpanSet *ss);
871extern bool overleft_int_set(int i, const Set *s);
872extern bool overleft_int_span(int i, const Span *s);
873extern bool overleft_int_spanset(int i, const SpanSet *ss);
874extern bool overleft_set_bigint(const Set *s, int64 i);
875extern bool overleft_set_float(const Set *s, double d);
876extern bool overleft_set_int(const Set *s, int i);
877extern bool overleft_set_set(const Set *s1, const Set *s2);
878extern bool overleft_set_text(const Set *s, text *txt);
879extern bool overleft_span_bigint(const Span *s, int64 i);
880extern bool overleft_span_float(const Span *s, double d);
881extern bool overleft_span_int(const Span *s, int i);
882extern bool overleft_span_span(const Span *s1, const Span *s2);
883extern bool overleft_span_spanset(const Span *s, const SpanSet *ss);
884extern bool overleft_spanset_bigint(const SpanSet *ss, int64 i);
885extern bool overleft_spanset_float(const SpanSet *ss, double d);
886extern bool overleft_spanset_int(const SpanSet *ss, int i);
887extern bool overleft_spanset_span(const SpanSet *ss, const Span *s);
888extern bool overleft_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2);
889extern bool overleft_text_set(const text *txt, const Set *s);
890extern bool overright_bigint_set(int64 i, const Set *s);
891extern bool overright_bigint_span(int64 i, const Span *s);
892extern bool overright_bigint_spanset(int64 i, const SpanSet *ss);
893extern bool overright_float_set(double d, const Set *s);
894extern bool overright_float_span(double d, const Span *s);
895extern bool overright_float_spanset(double d, const SpanSet *ss);
896extern bool overright_int_set(int i, const Set *s);
897extern bool overright_int_span(int i, const Span *s);
898extern bool overright_int_spanset(int i, const SpanSet *ss);
899extern bool overright_set_bigint(const Set *s, int64 i);
900extern bool overright_set_float(const Set *s, double d);
901extern bool overright_set_int(const Set *s, int i);
902extern bool overright_set_set(const Set *s1, const Set *s2);
903extern bool overright_set_text(const Set *s, text *txt);
904extern bool overright_span_bigint(const Span *s, int64 i);
905extern bool overright_span_float(const Span *s, double d);
906extern bool overright_span_int(const Span *s, int i);
907extern bool overright_span_span(const Span *s1, const Span *s2);
908extern bool overright_span_spanset(const Span *s, const SpanSet *ss);
909extern bool overright_spanset_bigint(const SpanSet *ss, int64 i);
910extern bool overright_spanset_float(const SpanSet *ss, double d);
911extern bool overright_spanset_int(const SpanSet *ss, int i);
912extern bool overright_spanset_span(const SpanSet *ss, const Span *s);
913extern bool overright_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2);
914extern bool overright_text_set(const text *txt, const Set *s);
915extern bool right_bigint_set(int64 i, const Set *s);
916extern bool right_bigint_span(int64 i, const Span *s);
917extern bool right_bigint_spanset(int64 i, const SpanSet *ss);
918extern bool right_float_set(double d, const Set *s);
919extern bool right_float_span(double d, const Span *s);
920extern bool right_float_spanset(double d, const SpanSet *ss);
921extern bool right_int_set(int i, const Set *s);
922extern bool right_int_span(int i, const Span *s);
923extern bool right_int_spanset(int i, const SpanSet *ss);
924extern bool right_set_bigint(const Set *s, int64 i);
925extern bool right_set_float(const Set *s, double d);
926extern bool right_set_int(const Set *s, int i);
927extern bool right_set_set(const Set *s1, const Set *s2);
928extern bool right_set_text(const Set *s, text *txt);
929extern bool right_span_bigint(const Span *s, int64 i);
930extern bool right_span_float(const Span *s, double d);
931extern bool right_span_int(const Span *s, int i);
932extern bool right_span_span(const Span *s1, const Span *s2);
933extern bool right_span_spanset(const Span *s, const SpanSet *ss);
934extern bool right_spanset_bigint(const SpanSet *ss, int64 i);
935extern bool right_spanset_float(const SpanSet *ss, double d);
936extern bool right_spanset_int(const SpanSet *ss, int i);
937extern bool right_spanset_span(const SpanSet *ss, const Span *s);
938extern bool right_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2);
939extern bool right_text_set(const text *txt, const Set *s);
940
941/*****************************************************************************
942 * Set functions for set and span types
943 *****************************************************************************/
944
945extern Set *intersection_bigint_set(int64 i, const Set *s);
946extern Set *intersection_date_set(DateADT d, const Set *s);
947extern Set *intersection_float_set(double d, const Set *s);
948extern Set *intersection_int_set(int i, const Set *s);
949extern Set *intersection_set_bigint(const Set *s, int64 i);
950extern Set *intersection_set_date(const Set *s, DateADT d);
951extern Set *intersection_set_float(const Set *s, double d);
952extern Set *intersection_set_int(const Set *s, int i);
953extern Set *intersection_set_set(const Set *s1, const Set *s2);
954extern Set *intersection_set_text(const Set *s, const text *txt);
956extern Span *intersection_span_bigint(const Span *s, int64 i);
957extern Span *intersection_span_date(const Span *s, DateADT d);
958extern Span *intersection_span_float(const Span *s, double d);
959extern Span *intersection_span_int(const Span *s, int i);
960extern Span *intersection_span_span(const Span *s1, const Span *s2);
961extern SpanSet *intersection_span_spanset(const Span *s, const SpanSet *ss);
965extern SpanSet *intersection_spanset_float(const SpanSet *ss, double d);
966extern SpanSet *intersection_spanset_int(const SpanSet *ss, int i);
967extern SpanSet *intersection_spanset_span(const SpanSet *ss, const Span *s);
968extern SpanSet *intersection_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2);
970extern Set *intersection_text_set(const text *txt, const Set *s);
972extern Set *minus_bigint_set(int64 i, const Set *s);
973extern SpanSet *minus_bigint_span(int64 i, const Span *s);
974extern SpanSet *minus_bigint_spanset(int64 i, const SpanSet *ss);
975extern Set *minus_date_set(DateADT d, const Set *s);
976extern SpanSet *minus_date_span(DateADT d, const Span *s);
977extern SpanSet *minus_date_spanset(DateADT d, const SpanSet *ss);
978extern Set *minus_float_set(double d, const Set *s);
979extern SpanSet *minus_float_span(double d, const Span *s);
980extern SpanSet *minus_float_spanset(double d, const SpanSet *ss);
981extern Set *minus_int_set(int i, const Set *s);
982extern SpanSet *minus_int_span(int i, const Span *s);
983extern SpanSet *minus_int_spanset(int i, const SpanSet *ss);
984extern Set *minus_set_bigint(const Set *s, int64 i);
985extern Set *minus_set_date(const Set *s, DateADT d);
986extern Set *minus_set_float(const Set *s, double d);
987extern Set *minus_set_int(const Set *s, int i);
988extern Set *minus_set_set(const Set *s1, const Set *s2);
989extern Set *minus_set_text(const Set *s, const text *txt);
990extern Set *minus_set_timestamptz(const Set *s, TimestampTz t);
991extern SpanSet *minus_span_bigint(const Span *s, int64 i);
992extern SpanSet *minus_span_date(const Span *s, DateADT d);
993extern SpanSet *minus_span_float(const Span *s, double d);
994extern SpanSet *minus_span_int(const Span *s, int i);
995extern SpanSet *minus_span_span(const Span *s1, const Span *s2);
996extern SpanSet *minus_span_spanset(const Span *s, const SpanSet *ss);
998extern SpanSet *minus_spanset_bigint(const SpanSet *ss, int64 i);
999extern SpanSet *minus_spanset_date(const SpanSet *ss, DateADT d);
1000extern SpanSet *minus_spanset_float(const SpanSet *ss, double d);
1001extern SpanSet *minus_spanset_int(const SpanSet *ss, int i);
1002extern SpanSet *minus_spanset_span(const SpanSet *ss, const Span *s);
1003extern SpanSet *minus_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2);
1005extern Set *minus_text_set(const text *txt, const Set *s);
1006extern Set *minus_timestamptz_set(TimestampTz t, const Set *s);
1007extern SpanSet *minus_timestamptz_span(TimestampTz t, const Span *s);
1009extern Set *union_bigint_set(int64 i, const Set *s);
1010extern SpanSet *union_bigint_span(const Span *s, int64 i);
1012extern Set *union_date_set(DateADT d, const Set *s);
1013extern SpanSet *union_date_span(const Span *s, DateADT d);
1015extern Set *union_float_set(double d, const Set *s);
1016extern SpanSet *union_float_span(const Span *s, double d);
1017extern SpanSet *union_float_spanset(double d, SpanSet *ss);
1018extern Set *union_int_set(int i, const Set *s);
1019extern SpanSet *union_int_span(int i, const Span *s);
1020extern SpanSet *union_int_spanset(int i, SpanSet *ss);
1021extern Set *union_set_bigint(const Set *s, int64 i);
1022extern Set *union_set_date(const Set *s, DateADT d);
1023extern Set *union_set_float(const Set *s, double d);
1024extern Set *union_set_int(const Set *s, int i);
1025extern Set *union_set_set(const Set *s1, const Set *s2);
1026extern Set *union_set_text(const Set *s, const text *txt);
1027extern Set *union_set_timestamptz(const Set *s, TimestampTz t);
1028extern SpanSet *union_span_bigint(const Span *s, int64 i);
1029extern SpanSet *union_span_date(const Span *s, DateADT d);
1030extern SpanSet *union_span_float(const Span *s, double d);
1031extern SpanSet *union_span_int(const Span *s, int i);
1032extern SpanSet *union_span_span(const Span *s1, const Span *s2);
1033extern SpanSet *union_span_spanset(const Span *s, const SpanSet *ss);
1034extern SpanSet *union_span_timestamptz(const Span *s, TimestampTz t);
1035extern SpanSet *union_spanset_bigint(const SpanSet *ss, int64 i);
1036extern SpanSet *union_spanset_date(const SpanSet *ss, DateADT d);
1037extern SpanSet *union_spanset_float(const SpanSet *ss, double d);
1038extern SpanSet *union_spanset_int(const SpanSet *ss, int i);
1039extern SpanSet *union_spanset_span(const SpanSet *ss, const Span *s);
1040extern SpanSet *union_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2);
1042extern Set *union_text_set(const text *txt, const Set *s);
1043extern Set *union_timestamptz_set(TimestampTz t, const Set *s);
1044extern SpanSet *union_timestamptz_span(TimestampTz t, const Span *s);
1046
1047/*****************************************************************************
1048 * Distance functions for set and span types
1049 *****************************************************************************/
1050
1051extern int64 distance_bigintset_bigintset(const Set *s1, const Set *s2);
1052extern int64 distance_bigintspan_bigintspan(const Span *s1, const Span *s2);
1053extern int64 distance_bigintspanset_bigintspan(const SpanSet *ss, const Span *s);
1054extern int64 distance_bigintspanset_bigintspanset(const SpanSet *ss1, const SpanSet *ss2);
1055extern int distance_dateset_dateset(const Set *s1, const Set *s2);
1056extern int distance_datespan_datespan(const Span *s1, const Span *s2);
1057extern int distance_datespanset_datespan(const SpanSet *ss, const Span *s);
1058extern int distance_datespanset_datespanset(const SpanSet *ss1, const SpanSet *ss2);
1059extern double distance_floatset_floatset(const Set *s1, const Set *s2);
1060extern double distance_floatspan_floatspan(const Span *s1, const Span *s2);
1061extern double distance_floatspanset_floatspan(const SpanSet *ss, const Span *s);
1062extern double distance_floatspanset_floatspanset(const SpanSet *ss1, const SpanSet *ss2);
1063extern int distance_intset_intset(const Set *s1, const Set *s2);
1064extern int distance_intspan_intspan(const Span *s1, const Span *s2);
1065extern int distance_intspanset_intspan(const SpanSet *ss, const Span *s);
1066extern int distance_intspanset_intspanset(const SpanSet *ss1, const SpanSet *ss2);
1067extern int64 distance_set_bigint(const Set *s, int64 i);
1068extern int distance_set_date(const Set *s, DateADT d);
1069extern double distance_set_float(const Set *s, double d);
1070extern int distance_set_int(const Set *s, int i);
1071extern double distance_set_timestamptz(const Set *s, TimestampTz t);
1072extern int64 distance_span_bigint(const Span *s, int64 i);
1073extern int distance_span_date(const Span *s, DateADT d);
1074extern double distance_span_float(const Span *s, double d);
1075extern int distance_span_int(const Span *s, int i);
1076extern double distance_span_timestamptz(const Span *s, TimestampTz t);
1077extern int64 distance_spanset_bigint(const SpanSet *ss, int64 i);
1078extern int distance_spanset_date(const SpanSet *ss, DateADT d);
1079extern double distance_spanset_float(const SpanSet *ss, double d);
1080extern int distance_spanset_int(const SpanSet *ss, int i);
1081extern double distance_spanset_timestamptz(const SpanSet *ss, TimestampTz t);
1082extern double distance_tstzset_tstzset(const Set *s1, const Set *s2);
1083extern double distance_tstzspan_tstzspan(const Span *s1, const Span *s2);
1084extern double distance_tstzspanset_tstzspan(const SpanSet *ss, const Span *s);
1085extern double distance_tstzspanset_tstzspanset(const SpanSet *ss1, const SpanSet *ss2);
1086
1087/*****************************************************************************
1088 * Aggregate functions for set and span types
1089 *****************************************************************************/
1090
1091extern Span *bigint_extent_transfn(Span *state, int64 i);
1092extern Set *bigint_union_transfn(Set *state, int64 i);
1093extern Span *date_extent_transfn(Span *state, DateADT d);
1094extern Set *date_union_transfn(Set *state, DateADT d);
1095extern Span *float_extent_transfn(Span *state, double d);
1096extern Set *float_union_transfn(Set *state, double d);
1097extern Span *int_extent_transfn(Span *state, int i);
1098extern Set *int_union_transfn(Set *state, int32 i);
1099extern Span *set_extent_transfn(Span *state, const Set *s);
1100extern Set *set_union_finalfn(Set *state);
1101extern Set *set_union_transfn(Set *state, Set *s);
1102extern Span *span_extent_transfn(Span *state, const Span *s);
1103extern SpanSet *span_union_transfn(SpanSet *state, const Span *s);
1104extern Span *spanset_extent_transfn(Span *state, const SpanSet *ss);
1105extern SpanSet *spanset_union_finalfn(SpanSet *state);
1106extern SpanSet *spanset_union_transfn(SpanSet *state, const SpanSet *ss);
1107extern Set *text_union_transfn(Set *state, const text *txt);
1109extern Set *timestamptz_union_transfn(Set *state, TimestampTz t);
1110
1111/*****************************************************************************
1112 * Bin functions for span and spanset types
1113 *****************************************************************************/
1114
1115extern int64 bigint_get_bin(int64 value, int64 vsize, int64 vorigin);
1116extern Span *bigintspan_bins(const Span *s, int64 vsize, int64 vorigin, int *count);
1117extern Span *bigintspanset_bins(const SpanSet *ss, int64 vsize, int64 vorigin, int *count);
1118extern DateADT date_get_bin(DateADT d, const Interval *duration, DateADT torigin);
1119extern Span *datespan_bins(const Span *s, const Interval *duration, DateADT torigin, int *count);
1120extern Span *datespanset_bins(const SpanSet *ss, const Interval *duration, DateADT torigin, int *count);
1121extern double float_get_bin(double value, double vsize, double vorigin);
1122extern Span *floatspan_bins(const Span *s, double vsize, double vorigin, int *count);
1123extern Span *floatspanset_bins(const SpanSet *ss, double vsize, double vorigin, int *count);
1124extern int int_get_bin(int value, int vsize, int vorigin);
1125extern Span *intspan_bins(const Span *s, int vsize, int vorigin, int *count);
1126extern Span *intspanset_bins(const SpanSet *ss, int vsize, int vorigin, int *count);
1127extern TimestampTz timestamptz_get_bin(TimestampTz t, const Interval *duration, TimestampTz torigin);
1128extern Span *tstzspan_bins(const Span *s, const Interval *duration, TimestampTz origin, int *count);
1129extern Span *tstzspanset_bins(const SpanSet *ss, const Interval *duration, TimestampTz torigin, int *count);
1130
1131/*===========================================================================*
1132 * Functions for temporal boxes
1133 *===========================================================================*/
1134
1135/*****************************************************************************
1136 * Input and output functions for box types
1137 *****************************************************************************/
1138
1139extern char *tbox_as_hexwkb(const TBox *box, uint8_t variant, size_t *size);
1140extern uint8_t *tbox_as_wkb(const TBox *box, uint8_t variant, size_t *size_out);
1141extern TBox *tbox_from_hexwkb(const char *hexwkb);
1142extern TBox *tbox_from_wkb(const uint8_t *wkb, size_t size);
1143extern TBox *tbox_in(const char *str);
1144extern char *tbox_out(const TBox *box, int maxdd);
1145
1146/*****************************************************************************
1147 * Constructor functions for box types
1148 *****************************************************************************/
1149
1150extern TBox *float_timestamptz_to_tbox(double d, TimestampTz t);
1151extern TBox *float_tstzspan_to_tbox(double d, const Span *s);
1152extern TBox *int_timestamptz_to_tbox(int i, TimestampTz t);
1153extern TBox *int_tstzspan_to_tbox(int i, const Span *s);
1154extern TBox *numspan_tstzspan_to_tbox(const Span *span, const Span *s);
1155extern TBox *numspan_timestamptz_to_tbox(const Span *span, TimestampTz t);
1156extern TBox *tbox_copy(const TBox *box);
1157extern TBox *tbox_make(const Span *s, const Span *p);
1158
1159/*****************************************************************************
1160 * Conversion functions for box types
1161 *****************************************************************************/
1162
1163extern TBox *float_to_tbox(double d);
1164extern TBox *int_to_tbox(int i);
1165extern TBox *set_to_tbox(const Set *s);
1166extern TBox *span_to_tbox(const Span *s);
1167extern TBox *spanset_to_tbox(const SpanSet *ss);
1168extern Span *tbox_to_intspan(const TBox *box);
1169extern Span *tbox_to_floatspan(const TBox *box);
1170extern Span *tbox_to_tstzspan(const TBox *box);
1172
1173/*****************************************************************************
1174 * Accessor functions for box types
1175 *****************************************************************************/
1176
1177extern uint32 tbox_hash(const TBox *box);
1178extern uint64 tbox_hash_extended(const TBox *box, uint64 seed);
1179extern bool tbox_hast(const TBox *box);
1180extern bool tbox_hasx(const TBox *box);
1181extern bool tbox_tmax(const TBox *box, TimestampTz *result);
1182extern bool tbox_tmax_inc(const TBox *box, bool *result);
1183extern bool tbox_tmin(const TBox *box, TimestampTz *result);
1184extern bool tbox_tmin_inc(const TBox *box, bool *result);
1185extern bool tbox_xmax(const TBox *box, double *result);
1186extern bool tbox_xmax_inc(const TBox *box, bool *result);
1187extern bool tbox_xmin(const TBox *box, double *result);
1188extern bool tbox_xmin_inc(const TBox *box, bool *result);
1189extern bool tboxfloat_xmax(const TBox *box, double *result);
1190extern bool tboxfloat_xmin(const TBox *box, double *result);
1191extern bool tboxint_xmax(const TBox *box, int *result);
1192extern bool tboxint_xmin(const TBox *box, int *result);
1193
1194/*****************************************************************************
1195 * Transformation functions for box types
1196 *****************************************************************************/
1197
1198extern TBox *tbox_expand_time(const TBox *box, const Interval *interv);
1199extern TBox *tbox_round(const TBox *box, int maxdd);
1200extern TBox *tbox_shift_scale_time(const TBox *box, const Interval *shift, const Interval *duration);
1201extern TBox *tfloatbox_expand(const TBox *box, double d);
1202extern TBox *tfloatbox_shift_scale(const TBox *box, double shift, double width, bool hasshift, bool haswidth);
1203extern TBox *tintbox_expand(const TBox *box, int i);
1204extern TBox *tintbox_shift_scale(const TBox *box, int shift, int width, bool hasshift, bool haswidth);
1205
1206/*****************************************************************************
1207 * Set functions for box types
1208 *****************************************************************************/
1209
1210extern TBox *union_tbox_tbox(const TBox *box1, const TBox *box2, bool strict);
1211extern TBox *intersection_tbox_tbox(const TBox *box1, const TBox *box2);
1212
1213/*****************************************************************************
1214 * Bounding box functions for box types
1215 *****************************************************************************/
1216
1217/* Topological functions for box types */
1218
1219extern bool adjacent_tbox_tbox(const TBox *box1, const TBox *box2);
1220extern bool contained_tbox_tbox(const TBox *box1, const TBox *box2);
1221extern bool contains_tbox_tbox(const TBox *box1, const TBox *box2);
1222extern bool overlaps_tbox_tbox(const TBox *box1, const TBox *box2);
1223extern bool same_tbox_tbox(const TBox *box1, const TBox *box2);
1224
1225/*****************************************************************************/
1226
1227/* Position functions for box types */
1228
1229extern bool after_tbox_tbox(const TBox *box1, const TBox *box2);
1230extern bool before_tbox_tbox(const TBox *box1, const TBox *box2);
1231extern bool left_tbox_tbox(const TBox *box1, const TBox *box2);
1232extern bool overafter_tbox_tbox(const TBox *box1, const TBox *box2);
1233extern bool overbefore_tbox_tbox(const TBox *box1, const TBox *box2);
1234extern bool overleft_tbox_tbox(const TBox *box1, const TBox *box2);
1235extern bool overright_tbox_tbox(const TBox *box1, const TBox *box2);
1236extern bool right_tbox_tbox(const TBox *box1, const TBox *box2);
1237
1238/*****************************************************************************
1239 * Comparison functions for box types
1240 *****************************************************************************/
1241
1242extern int tbox_cmp(const TBox *box1, const TBox *box2);
1243extern bool tbox_eq(const TBox *box1, const TBox *box2);
1244extern bool tbox_ge(const TBox *box1, const TBox *box2);
1245extern bool tbox_gt(const TBox *box1, const TBox *box2);
1246extern bool tbox_le(const TBox *box1, const TBox *box2);
1247extern bool tbox_lt(const TBox *box1, const TBox *box2);
1248extern bool tbox_ne(const TBox *box1, const TBox *box2);
1249
1250/*===========================================================================*
1251 * Functions for temporal types
1252 *===========================================================================*/
1253
1254/*****************************************************************************
1255 * Input and output functions for temporal types
1256 *****************************************************************************/
1257
1258extern Temporal *tbool_from_mfjson(const char *str);
1259extern Temporal *tbool_in(const char *str);
1260extern char *tbool_out(const Temporal *temp);
1261extern char *temporal_as_hexwkb(const Temporal *temp, uint8_t variant, size_t *size_out);
1262extern char *temporal_as_mfjson(const Temporal *temp, bool with_bbox, int flags, int precision, const char *srs);
1263extern uint8_t *temporal_as_wkb(const Temporal *temp, uint8_t variant, size_t *size_out);
1264extern Temporal *temporal_from_hexwkb(const char *hexwkb);
1265extern Temporal *temporal_from_wkb(const uint8_t *wkb, size_t size);
1266extern Temporal *tfloat_from_mfjson(const char *str);
1267extern Temporal *tfloat_in(const char *str);
1268extern char *tfloat_out(const Temporal *temp, int maxdd);
1269extern Temporal *tint_from_mfjson(const char *str);
1270extern Temporal *tint_in(const char *str);
1271extern char *tint_out(const Temporal *temp);
1272extern Temporal *ttext_from_mfjson(const char *str);
1273extern Temporal *ttext_in(const char *str);
1274extern char *ttext_out(const Temporal *temp);
1275
1276/*****************************************************************************
1277 * Constructor functions for temporal types
1278 *****************************************************************************/
1279
1280extern Temporal *tbool_from_base_temp(bool b, const Temporal *temp);
1281extern TInstant *tboolinst_make(bool b, TimestampTz t);
1282extern TSequence *tboolseq_from_base_tstzset(bool b, const Set *s);
1283extern TSequence *tboolseq_from_base_tstzspan(bool b, const Span *s);
1284extern TSequenceSet *tboolseqset_from_base_tstzspanset(bool b, const SpanSet *ss);
1285extern Temporal *temporal_copy(const Temporal *temp);
1286extern Temporal *tfloat_from_base_temp(double d, const Temporal *temp);
1287extern TInstant *tfloatinst_make(double d, TimestampTz t);
1288extern TSequence *tfloatseq_from_base_tstzset(double d, const Set *s);
1289extern TSequence *tfloatseq_from_base_tstzspan(double d, const Span *s, interpType interp);
1290extern TSequenceSet *tfloatseqset_from_base_tstzspanset(double d, const SpanSet *ss, interpType interp);
1291extern Temporal *tint_from_base_temp(int i, const Temporal *temp);
1292extern TInstant *tintinst_make(int i, TimestampTz t);
1293extern TSequence *tintseq_from_base_tstzset(int i, const Set *s);
1294extern TSequence *tintseq_from_base_tstzspan(int i, const Span *s);
1295extern TSequenceSet *tintseqset_from_base_tstzspanset(int i, const SpanSet *ss);
1296extern TSequence *tsequence_make(TInstant **instants, int count, bool lower_inc, bool upper_inc, interpType interp, bool normalize);
1297extern TSequenceSet *tsequenceset_make(TSequence **sequences, int count, bool normalize);
1298extern TSequenceSet *tsequenceset_make_gaps(TInstant **instants, int count, interpType interp, const Interval *maxt, double maxdist);
1299extern Temporal *ttext_from_base_temp(const text *txt, const Temporal *temp);
1300extern TInstant *ttextinst_make(const text *txt, TimestampTz t);
1301extern TSequence *ttextseq_from_base_tstzset(const text *txt, const Set *s);
1302extern TSequence *ttextseq_from_base_tstzspan(const text *txt, const Span *s);
1303extern TSequenceSet *ttextseqset_from_base_tstzspanset(const text *txt, const SpanSet *ss);
1304
1305/*****************************************************************************
1306 * Conversion functions for temporal types
1307 *****************************************************************************/
1308
1309extern Temporal *tbool_to_tint(const Temporal *temp);
1310extern Span *temporal_to_tstzspan(const Temporal *temp);
1311extern Temporal *tfloat_to_tint(const Temporal *temp);
1312extern Temporal *tint_to_tfloat(const Temporal *temp);
1313extern Span *tnumber_to_span(const Temporal *temp);
1314extern TBox *tnumber_to_tbox (const Temporal *temp);
1315
1316/*****************************************************************************
1317 * Accessor functions for temporal types
1318 *****************************************************************************/
1319
1320extern bool tbool_end_value(const Temporal *temp);
1321extern bool tbool_start_value(const Temporal *temp);
1322extern bool tbool_value_at_timestamptz(const Temporal *temp, TimestampTz t, bool strict, bool *value);
1323extern bool tbool_value_n(const Temporal *temp, int n, bool *result);
1324extern bool *tbool_values(const Temporal *temp, int *count);
1325extern Interval *temporal_duration(const Temporal *temp, bool boundspan);
1326extern TInstant *temporal_end_instant(const Temporal *temp);
1327extern TSequence *temporal_end_sequence(const Temporal *temp);
1329extern uint32 temporal_hash(const Temporal *temp);
1330extern TInstant *temporal_instant_n(const Temporal *temp, int n);
1331extern TInstant **temporal_instants(const Temporal *temp, int *count);
1332extern const char *temporal_interp(const Temporal *temp);
1333extern bool temporal_lower_inc(const Temporal *temp);
1334extern TInstant *temporal_max_instant(const Temporal *temp);
1335extern TInstant *temporal_min_instant(const Temporal *temp);
1336extern int temporal_num_instants(const Temporal *temp);
1337extern int temporal_num_sequences(const Temporal *temp);
1338extern int temporal_num_timestamps(const Temporal *temp);
1339extern TSequenceSet *temporal_segm_duration(const Temporal *temp, const Interval *duration, bool atleast, bool strict);
1340extern TSequence **temporal_segments(const Temporal *temp, int *count);
1341extern TSequence *temporal_sequence_n(const Temporal *temp, int i);
1342extern TSequence **temporal_sequences(const Temporal *temp, int *count);
1343extern TInstant *temporal_start_instant(const Temporal *temp);
1344extern TSequence *temporal_start_sequence(const Temporal *temp);
1346extern TSequenceSet *temporal_stops(const Temporal *temp, double maxdist, const Interval *minduration);
1347extern const char *temporal_subtype(const Temporal *temp);
1348extern SpanSet *temporal_time(const Temporal *temp);
1349extern TimestampTz *temporal_timestamps(const Temporal *temp, int *count);
1350extern bool temporal_timestamptz_n(const Temporal *temp, int n, TimestampTz *result);
1351extern bool temporal_upper_inc(const Temporal *temp);
1352extern double tfloat_avg_value(const Temporal *temp);
1353extern double tfloat_end_value(const Temporal *temp);
1354extern double tfloat_min_value(const Temporal *temp);
1355extern double tfloat_max_value(const Temporal *temp);
1356extern double tfloat_start_value(const Temporal *temp);
1357extern bool tfloat_value_at_timestamptz(const Temporal *temp, TimestampTz t, bool strict, double *value);
1358extern bool tfloat_value_n(const Temporal *temp, int n, double *result);
1359extern double *tfloat_values(const Temporal *temp, int *count);
1360extern int tint_end_value(const Temporal *temp);
1361extern int tint_max_value(const Temporal *temp);
1362extern int tint_min_value(const Temporal *temp);
1363extern int tint_start_value(const Temporal *temp);
1364extern bool tint_value_at_timestamptz(const Temporal *temp, TimestampTz t, bool strict, int *value);
1365extern bool tint_value_n(const Temporal *temp, int n, int *result);
1366extern int *tint_values(const Temporal *temp, int *count);
1367extern double tnumber_avg_value(const Temporal *temp);
1368extern double tnumber_integral(const Temporal *temp);
1369extern double tnumber_twavg(const Temporal *temp);
1370extern SpanSet *tnumber_valuespans(const Temporal *temp);
1371extern text *ttext_end_value(const Temporal *temp);
1372extern text *ttext_max_value(const Temporal *temp);
1373extern text *ttext_min_value(const Temporal *temp);
1374extern text *ttext_start_value(const Temporal *temp);
1375extern bool ttext_value_at_timestamptz(const Temporal *temp, TimestampTz t, bool strict, text **value);
1376extern bool ttext_value_n(const Temporal *temp, int n, text **result);
1377extern text **ttext_values(const Temporal *temp, int *count);
1378
1379/*****************************************************************************
1380 * Transformation functions for temporal types
1381 *****************************************************************************/
1382
1383extern double float_degrees(double value, bool normalize);
1384extern Temporal **temparr_round(Temporal **temp, int count, int maxdd);
1385extern Temporal *temporal_round(const Temporal *temp, int maxdd);
1386extern Temporal *temporal_scale_time(const Temporal *temp, const Interval *duration);
1387extern Temporal *temporal_set_interp(const Temporal *temp, interpType interp);
1388extern Temporal *temporal_shift_scale_time(const Temporal *temp, const Interval *shift, const Interval *duration);
1389extern Temporal *temporal_shift_time(const Temporal *temp, const Interval *shift);
1390extern TInstant *temporal_to_tinstant(const Temporal *temp);
1391extern TSequence *temporal_to_tsequence(const Temporal *temp, interpType interp);
1392extern TSequenceSet *temporal_to_tsequenceset(const Temporal *temp, interpType interp);
1393extern Temporal *tfloat_ceil(const Temporal *temp);
1394extern Temporal *tfloat_degrees(const Temporal *temp, bool normalize);
1395extern Temporal *tfloat_floor(const Temporal *temp);
1396extern Temporal *tfloat_radians(const Temporal *temp);
1397extern Temporal *tfloat_scale_value(const Temporal *temp, double width);
1398extern Temporal *tfloat_shift_scale_value(const Temporal *temp, double shift, double width);
1399extern Temporal *tfloat_shift_value(const Temporal *temp, double shift);
1400extern Temporal *tint_scale_value(const Temporal *temp, int width);
1401extern Temporal *tint_shift_scale_value(const Temporal *temp, int shift, int width);
1402extern Temporal *tint_shift_value(const Temporal *temp, int shift);
1403
1404/*****************************************************************************
1405 * Modification functions for temporal types
1406 *****************************************************************************/
1407
1408extern Temporal *temporal_append_tinstant(Temporal *temp, const TInstant *inst, interpType interp, double maxdist, const Interval *maxt, bool expand);
1409extern Temporal *temporal_append_tsequence(Temporal *temp, const TSequence *seq, bool expand);
1410extern Temporal *temporal_delete_timestamptz(const Temporal *temp, TimestampTz t, bool connect);
1411extern Temporal *temporal_delete_tstzset(const Temporal *temp, const Set *s, bool connect);
1412extern Temporal *temporal_delete_tstzspan(const Temporal *temp, const Span *s, bool connect);
1413extern Temporal *temporal_delete_tstzspanset(const Temporal *temp, const SpanSet *ss, bool connect);
1414extern Temporal *temporal_insert(const Temporal *temp1, const Temporal *temp2, bool connect);
1415extern Temporal *temporal_merge(const Temporal *temp1, const Temporal *temp2);
1416extern Temporal *temporal_merge_array(Temporal **temparr, int count);
1417extern Temporal *temporal_update(const Temporal *temp1, const Temporal *temp2, bool connect);
1418
1419/*****************************************************************************
1420 * Restriction functions for temporal types
1421 *****************************************************************************/
1422
1423extern Temporal *tbool_at_value(const Temporal *temp, bool b);
1424extern Temporal *tbool_minus_value(const Temporal *temp, bool b);
1425extern Temporal *temporal_after_timestamptz(const Temporal *temp, TimestampTz t, bool strict);
1426extern Temporal *temporal_at_max(const Temporal *temp);
1427extern Temporal *temporal_at_min(const Temporal *temp);
1429extern Temporal *temporal_at_tstzset(const Temporal *temp, const Set *s);
1430extern Temporal *temporal_at_tstzspan(const Temporal *temp, const Span *s);
1431extern Temporal *temporal_at_tstzspanset(const Temporal *temp, const SpanSet *ss);
1432extern Temporal *temporal_at_values(const Temporal *temp, const Set *set);
1433extern Temporal *temporal_before_timestamptz(const Temporal *temp, TimestampTz t, bool strict);
1434extern Temporal *temporal_minus_max(const Temporal *temp);
1435extern Temporal *temporal_minus_min(const Temporal *temp);
1437extern Temporal *temporal_minus_tstzset(const Temporal *temp, const Set *s);
1438extern Temporal *temporal_minus_tstzspan(const Temporal *temp, const Span *s);
1439extern Temporal *temporal_minus_tstzspanset(const Temporal *temp, const SpanSet *ss);
1440extern Temporal *temporal_minus_values(const Temporal *temp, const Set *set);
1441extern Temporal *tfloat_at_value(const Temporal *temp, double d);
1442extern Temporal *tfloat_minus_value(const Temporal *temp, double d);
1443extern Temporal *tint_at_value(const Temporal *temp, int i);
1444extern Temporal *tint_minus_value(const Temporal *temp, int i);
1445extern Temporal *tnumber_at_span(const Temporal *temp, const Span *span);
1446extern Temporal *tnumber_at_spanset(const Temporal *temp, const SpanSet *ss);
1447extern Temporal *tnumber_at_tbox(const Temporal *temp, const TBox *box);
1448extern Temporal *tnumber_minus_span(const Temporal *temp, const Span *span);
1449extern Temporal *tnumber_minus_spanset(const Temporal *temp, const SpanSet *ss);
1450extern Temporal *tnumber_minus_tbox(const Temporal *temp, const TBox *box);
1451extern Temporal *ttext_at_value(const Temporal *temp, text *txt);
1452extern Temporal *ttext_minus_value(const Temporal *temp, text *txt);
1453
1454/*****************************************************************************
1455 * Comparison functions for temporal types
1456 *****************************************************************************/
1457
1458/* Traditional comparison functions for temporal types */
1459
1460extern int temporal_cmp(const Temporal *temp1, const Temporal *temp2);
1461extern bool temporal_eq(const Temporal *temp1, const Temporal *temp2);
1462extern bool temporal_ge(const Temporal *temp1, const Temporal *temp2);
1463extern bool temporal_gt(const Temporal *temp1, const Temporal *temp2);
1464extern bool temporal_le(const Temporal *temp1, const Temporal *temp2);
1465extern bool temporal_lt(const Temporal *temp1, const Temporal *temp2);
1466extern bool temporal_ne(const Temporal *temp1, const Temporal *temp2);
1467
1468/*****************************************************************************/
1469
1470/* Ever and always comparison functions for temporal types */
1471
1472extern int always_eq_bool_tbool(bool b, const Temporal *temp);
1473extern int always_eq_float_tfloat(double d, const Temporal *temp);
1474extern int always_eq_int_tint(int i, const Temporal *temp);
1475extern int always_eq_tbool_bool(const Temporal *temp, bool b);
1476extern int always_eq_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1477extern int always_eq_text_ttext(const text *txt, const Temporal *temp);
1478extern int always_eq_tfloat_float(const Temporal *temp, double d);
1479extern int always_eq_tint_int(const Temporal *temp, int i);
1480extern int always_eq_ttext_text(const Temporal *temp, const text *txt);
1481extern int always_ge_float_tfloat(double d, const Temporal *temp);
1482extern int always_ge_int_tint(int i, const Temporal *temp);
1483extern int always_ge_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1484extern int always_ge_text_ttext(const text *txt, const Temporal *temp);
1485extern int always_ge_tfloat_float(const Temporal *temp, double d);
1486extern int always_ge_tint_int(const Temporal *temp, int i);
1487extern int always_ge_ttext_text(const Temporal *temp, const text *txt);
1488extern int always_gt_float_tfloat(double d, const Temporal *temp);
1489extern int always_gt_int_tint(int i, const Temporal *temp);
1490extern int always_gt_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1491extern int always_gt_text_ttext(const text *txt, const Temporal *temp);
1492extern int always_gt_tfloat_float(const Temporal *temp, double d);
1493extern int always_gt_tint_int(const Temporal *temp, int i);
1494extern int always_gt_ttext_text(const Temporal *temp, const text *txt);
1495extern int always_le_float_tfloat(double d, const Temporal *temp);
1496extern int always_le_int_tint(int i, const Temporal *temp);
1497extern int always_le_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1498extern int always_le_text_ttext(const text *txt, const Temporal *temp);
1499extern int always_le_tfloat_float(const Temporal *temp, double d);
1500extern int always_le_tint_int(const Temporal *temp, int i);
1501extern int always_le_ttext_text(const Temporal *temp, const text *txt);
1502extern int always_lt_float_tfloat(double d, const Temporal *temp);
1503extern int always_lt_int_tint(int i, const Temporal *temp);
1504extern int always_lt_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1505extern int always_lt_text_ttext(const text *txt, const Temporal *temp);
1506extern int always_lt_tfloat_float(const Temporal *temp, double d);
1507extern int always_lt_tint_int(const Temporal *temp, int i);
1508extern int always_lt_ttext_text(const Temporal *temp, const text *txt);
1509extern int always_ne_bool_tbool(bool b, const Temporal *temp);
1510extern int always_ne_float_tfloat(double d, const Temporal *temp);
1511extern int always_ne_int_tint(int i, const Temporal *temp);
1512extern int always_ne_tbool_bool(const Temporal *temp, bool b);
1513extern int always_ne_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1514extern int always_ne_text_ttext(const text *txt, const Temporal *temp);
1515extern int always_ne_tfloat_float(const Temporal *temp, double d);
1516extern int always_ne_tint_int(const Temporal *temp, int i);
1517extern int always_ne_ttext_text(const Temporal *temp, const text *txt);
1518extern int ever_eq_bool_tbool(bool b, const Temporal *temp);
1519extern int ever_eq_float_tfloat(double d, const Temporal *temp);
1520extern int ever_eq_int_tint(int i, const Temporal *temp);
1521extern int ever_eq_tbool_bool(const Temporal *temp, bool b);
1522extern int ever_eq_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1523extern int ever_eq_text_ttext(const text *txt, const Temporal *temp);
1524extern int ever_eq_tfloat_float(const Temporal *temp, double d);
1525extern int ever_eq_tint_int(const Temporal *temp, int i);
1526extern int ever_eq_ttext_text(const Temporal *temp, const text *txt);
1527extern int ever_ge_float_tfloat(double d, const Temporal *temp);
1528extern int ever_ge_int_tint(int i, const Temporal *temp);
1529extern int ever_ge_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1530extern int ever_ge_text_ttext(const text *txt, const Temporal *temp);
1531extern int ever_ge_tfloat_float(const Temporal *temp, double d);
1532extern int ever_ge_tint_int(const Temporal *temp, int i);
1533extern int ever_ge_ttext_text(const Temporal *temp, const text *txt);
1534extern int ever_gt_float_tfloat(double d, const Temporal *temp);
1535extern int ever_gt_int_tint(int i, const Temporal *temp);
1536extern int ever_gt_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1537extern int ever_gt_text_ttext(const text *txt, const Temporal *temp);
1538extern int ever_gt_tfloat_float(const Temporal *temp, double d);
1539extern int ever_gt_tint_int(const Temporal *temp, int i);
1540extern int ever_gt_ttext_text(const Temporal *temp, const text *txt);
1541extern int ever_le_float_tfloat(double d, const Temporal *temp);
1542extern int ever_le_int_tint(int i, const Temporal *temp);
1543extern int ever_le_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1544extern int ever_le_text_ttext(const text *txt, const Temporal *temp);
1545extern int ever_le_tfloat_float(const Temporal *temp, double d);
1546extern int ever_le_tint_int(const Temporal *temp, int i);
1547extern int ever_le_ttext_text(const Temporal *temp, const text *txt);
1548extern int ever_lt_float_tfloat(double d, const Temporal *temp);
1549extern int ever_lt_int_tint(int i, const Temporal *temp);
1550extern int ever_lt_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1551extern int ever_lt_text_ttext(const text *txt, const Temporal *temp);
1552extern int ever_lt_tfloat_float(const Temporal *temp, double d);
1553extern int ever_lt_tint_int(const Temporal *temp, int i);
1554extern int ever_lt_ttext_text(const Temporal *temp, const text *txt);
1555extern int ever_ne_bool_tbool(bool b, const Temporal *temp);
1556extern int ever_ne_float_tfloat(double d, const Temporal *temp);
1557extern int ever_ne_int_tint(int i, const Temporal *temp);
1558extern int ever_ne_tbool_bool(const Temporal *temp, bool b);
1559extern int ever_ne_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1560extern int ever_ne_text_ttext(const text *txt, const Temporal *temp);
1561extern int ever_ne_tfloat_float(const Temporal *temp, double d);
1562extern int ever_ne_tint_int(const Temporal *temp, int i);
1563extern int ever_ne_ttext_text(const Temporal *temp, const text *txt);
1564
1565/*****************************************************************************/
1566
1567/* Temporal comparison functions for temporal types */
1568
1569extern Temporal *teq_bool_tbool(bool b, const Temporal *temp);
1570extern Temporal *teq_float_tfloat(double d, const Temporal *temp);
1571extern Temporal *teq_int_tint(int i, const Temporal *temp);
1572extern Temporal *teq_tbool_bool(const Temporal *temp, bool b);
1573extern Temporal *teq_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1574extern Temporal *teq_text_ttext(const text *txt, const Temporal *temp);
1575extern Temporal *teq_tfloat_float(const Temporal *temp, double d);
1576extern Temporal *teq_tint_int(const Temporal *temp, int i);
1577extern Temporal *teq_ttext_text(const Temporal *temp, const text *txt);
1578extern Temporal *tge_float_tfloat(double d, const Temporal *temp);
1579extern Temporal *tge_int_tint(int i, const Temporal *temp);
1580extern Temporal *tge_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1581extern Temporal *tge_text_ttext(const text *txt, const Temporal *temp);
1582extern Temporal *tge_tfloat_float(const Temporal *temp, double d);
1583extern Temporal *tge_tint_int(const Temporal *temp, int i);
1584extern Temporal *tge_ttext_text(const Temporal *temp, const text *txt);
1585extern Temporal *tgt_float_tfloat(double d, const Temporal *temp);
1586extern Temporal *tgt_int_tint(int i, const Temporal *temp);
1587extern Temporal *tgt_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1588extern Temporal *tgt_text_ttext(const text *txt, const Temporal *temp);
1589extern Temporal *tgt_tfloat_float(const Temporal *temp, double d);
1590extern Temporal *tgt_tint_int(const Temporal *temp, int i);
1591extern Temporal *tgt_ttext_text(const Temporal *temp, const text *txt);
1592extern Temporal *tle_float_tfloat(double d, const Temporal *temp);
1593extern Temporal *tle_int_tint(int i, const Temporal *temp);
1594extern Temporal *tle_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1595extern Temporal *tle_text_ttext(const text *txt, const Temporal *temp);
1596extern Temporal *tle_tfloat_float(const Temporal *temp, double d);
1597extern Temporal *tle_tint_int(const Temporal *temp, int i);
1598extern Temporal *tle_ttext_text(const Temporal *temp, const text *txt);
1599extern Temporal *tlt_float_tfloat(double d, const Temporal *temp);
1600extern Temporal *tlt_int_tint(int i, const Temporal *temp);
1601extern Temporal *tlt_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1602extern Temporal *tlt_text_ttext(const text *txt, const Temporal *temp);
1603extern Temporal *tlt_tfloat_float(const Temporal *temp, double d);
1604extern Temporal *tlt_tint_int(const Temporal *temp, int i);
1605extern Temporal *tlt_ttext_text(const Temporal *temp, const text *txt);
1606extern Temporal *tne_bool_tbool(bool b, const Temporal *temp);
1607extern Temporal *tne_float_tfloat(double d, const Temporal *temp);
1608extern Temporal *tne_int_tint(int i, const Temporal *temp);
1609extern Temporal *tne_tbool_bool(const Temporal *temp, bool b);
1610extern Temporal *tne_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1611extern Temporal *tne_text_ttext(const text *txt, const Temporal *temp);
1612extern Temporal *tne_tfloat_float(const Temporal *temp, double d);
1613extern Temporal *tne_tint_int(const Temporal *temp, int i);
1614extern Temporal *tne_ttext_text(const Temporal *temp, const text *txt);
1615
1616/*****************************************************************************
1617 * Bounding box functions for temporal types
1618 *****************************************************************************/
1619
1620/* Split functions */
1621
1622extern Span *temporal_spans(const Temporal *temp, int *count);
1623extern Span *temporal_split_each_n_spans(const Temporal *temp, int elem_count, int *count);
1624extern Span *temporal_split_n_spans(const Temporal *temp, int span_count, int *count);
1625extern TBox *tnumber_split_each_n_tboxes(const Temporal *temp, int elem_count, int *count);
1626extern TBox *tnumber_split_n_tboxes(const Temporal *temp, int box_count, int *count);
1627extern TBox *tnumber_tboxes(const Temporal *temp, int *count);
1628
1629/* Topological functions for temporal types */
1630
1631extern bool adjacent_numspan_tnumber(const Span *s, const Temporal *temp);
1632extern bool adjacent_tbox_tnumber(const TBox *box, const Temporal *temp);
1633extern bool adjacent_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1634extern bool adjacent_temporal_tstzspan(const Temporal *temp, const Span *s);
1635extern bool adjacent_tnumber_numspan(const Temporal *temp, const Span *s);
1636extern bool adjacent_tnumber_tbox(const Temporal *temp, const TBox *box);
1637extern bool adjacent_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2);
1638extern bool adjacent_tstzspan_temporal(const Span *s, const Temporal *temp);
1639extern bool contained_numspan_tnumber(const Span *s, const Temporal *temp);
1640extern bool contained_tbox_tnumber(const TBox *box, const Temporal *temp);
1641extern bool contained_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1642extern bool contained_temporal_tstzspan(const Temporal *temp, const Span *s);
1643extern bool contained_tnumber_numspan(const Temporal *temp, const Span *s);
1644extern bool contained_tnumber_tbox(const Temporal *temp, const TBox *box);
1645extern bool contained_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2);
1646extern bool contained_tstzspan_temporal(const Span *s, const Temporal *temp);
1647extern bool contains_numspan_tnumber(const Span *s, const Temporal *temp);
1648extern bool contains_tbox_tnumber(const TBox *box, const Temporal *temp);
1649extern bool contains_temporal_tstzspan(const Temporal *temp, const Span *s);
1650extern bool contains_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1651extern bool contains_tnumber_numspan(const Temporal *temp, const Span *s);
1652extern bool contains_tnumber_tbox(const Temporal *temp, const TBox *box);
1653extern bool contains_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2);
1654extern bool contains_tstzspan_temporal(const Span *s, const Temporal *temp);
1655extern bool overlaps_numspan_tnumber(const Span *s, const Temporal *temp);
1656extern bool overlaps_tbox_tnumber(const TBox *box, const Temporal *temp);
1657extern bool overlaps_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1658extern bool overlaps_temporal_tstzspan(const Temporal *temp, const Span *s);
1659extern bool overlaps_tnumber_numspan(const Temporal *temp, const Span *s);
1660extern bool overlaps_tnumber_tbox(const Temporal *temp, const TBox *box);
1661extern bool overlaps_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2);
1662extern bool overlaps_tstzspan_temporal(const Span *s, const Temporal *temp);
1663extern bool same_numspan_tnumber(const Span *s, const Temporal *temp);
1664extern bool same_tbox_tnumber(const TBox *box, const Temporal *temp);
1665extern bool same_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1666extern bool same_temporal_tstzspan(const Temporal *temp, const Span *s);
1667extern bool same_tnumber_numspan(const Temporal *temp, const Span *s);
1668extern bool same_tnumber_tbox(const Temporal *temp, const TBox *box);
1669extern bool same_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2);
1670extern bool same_tstzspan_temporal(const Span *s, const Temporal *temp);
1671
1672/*****************************************************************************/
1673
1674/* Position functions for temporal types */
1675
1676extern bool after_tbox_tnumber(const TBox *box, const Temporal *temp);
1677extern bool after_temporal_tstzspan(const Temporal *temp, const Span *s);
1678extern bool after_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1679extern bool after_tnumber_tbox(const Temporal *temp, const TBox *box);
1680extern bool after_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2);
1681extern bool after_tstzspan_temporal(const Span *s, const Temporal *temp);
1682extern bool before_tbox_tnumber(const TBox *box, const Temporal *temp);
1683extern bool before_temporal_tstzspan(const Temporal *temp, const Span *s);
1684extern bool before_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1685extern bool before_tnumber_tbox(const Temporal *temp, const TBox *box);
1686extern bool before_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2);
1687extern bool before_tstzspan_temporal(const Span *s, const Temporal *temp);
1688extern bool left_tbox_tnumber(const TBox *box, const Temporal *temp);
1689extern bool left_numspan_tnumber(const Span *s, const Temporal *temp);
1690extern bool left_tnumber_numspan(const Temporal *temp, const Span *s);
1691extern bool left_tnumber_tbox(const Temporal *temp, const TBox *box);
1692extern bool left_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2);
1693extern bool overafter_tbox_tnumber(const TBox *box, const Temporal *temp);
1694extern bool overafter_temporal_tstzspan(const Temporal *temp, const Span *s);
1695extern bool overafter_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1696extern bool overafter_tnumber_tbox(const Temporal *temp, const TBox *box);
1697extern bool overafter_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2);
1698extern bool overafter_tstzspan_temporal(const Span *s, const Temporal *temp);
1699extern bool overbefore_tbox_tnumber(const TBox *box, const Temporal *temp);
1700extern bool overbefore_temporal_tstzspan(const Temporal *temp, const Span *s);
1701extern bool overbefore_temporal_temporal(const Temporal *temp1, const Temporal *temp2);
1702extern bool overbefore_tnumber_tbox(const Temporal *temp, const TBox *box);
1703extern bool overbefore_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2);
1704extern bool overbefore_tstzspan_temporal(const Span *s, const Temporal *temp);
1705extern bool overleft_numspan_tnumber(const Span *s, const Temporal *temp);
1706extern bool overleft_tbox_tnumber(const TBox *box, const Temporal *temp);
1707extern bool overleft_tnumber_numspan(const Temporal *temp, const Span *s);
1708extern bool overleft_tnumber_tbox(const Temporal *temp, const TBox *box);
1709extern bool overleft_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2);
1710extern bool overright_numspan_tnumber(const Span *s, const Temporal *temp);
1711extern bool overright_tbox_tnumber(const TBox *box, const Temporal *temp);
1712extern bool overright_tnumber_numspan(const Temporal *temp, const Span *s);
1713extern bool overright_tnumber_tbox(const Temporal *temp, const TBox *box);
1714extern bool overright_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2);
1715extern bool right_numspan_tnumber(const Span *s, const Temporal *temp);
1716extern bool right_tbox_tnumber(const TBox *box, const Temporal *temp);
1717extern bool right_tnumber_numspan(const Temporal *temp, const Span *s);
1718extern bool right_tnumber_tbox(const Temporal *temp, const TBox *box);
1719extern bool right_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2);
1720
1721/*****************************************************************************
1722 * Boolean functions for temporal types
1723 *****************************************************************************/
1724
1725extern Temporal *tand_bool_tbool(bool b, const Temporal *temp);
1726extern Temporal *tand_tbool_bool(const Temporal *temp, bool b);
1727extern Temporal *tand_tbool_tbool(const Temporal *temp1, const Temporal *temp2);
1728extern SpanSet *tbool_when_true(const Temporal *temp);
1729extern Temporal *tnot_tbool(const Temporal *temp);
1730extern Temporal *tor_bool_tbool(bool b, const Temporal *temp);
1731extern Temporal *tor_tbool_bool(const Temporal *temp, bool b);
1732extern Temporal *tor_tbool_tbool(const Temporal *temp1, const Temporal *temp2);
1733
1734/*****************************************************************************
1735 * Mathematical functions for temporal types
1736 *****************************************************************************/
1737
1738extern Temporal *add_float_tfloat(double d, const Temporal *tnumber);
1739extern Temporal *add_int_tint(int i, const Temporal *tnumber);
1740extern Temporal *add_tfloat_float(const Temporal *tnumber, double d);
1741extern Temporal *add_tint_int(const Temporal *tnumber, int i);
1742extern Temporal *add_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2);
1743extern Temporal *div_float_tfloat(double d, const Temporal *tnumber);
1744extern Temporal *div_int_tint(int i, const Temporal *tnumber);
1745extern Temporal *div_tfloat_float(const Temporal *tnumber, double d);
1746extern Temporal *div_tint_int(const Temporal *tnumber, int i);
1747extern Temporal *div_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2);
1748extern Temporal *mult_float_tfloat(double d, const Temporal *tnumber);
1749extern Temporal *mult_int_tint(int i, const Temporal *tnumber);
1750extern Temporal *mult_tfloat_float(const Temporal *tnumber, double d);
1751extern Temporal *mult_tint_int(const Temporal *tnumber, int i);
1752extern Temporal *mult_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2);
1753extern Temporal *sub_float_tfloat(double d, const Temporal *tnumber);
1754extern Temporal *sub_int_tint(int i, const Temporal *tnumber);
1755extern Temporal *sub_tfloat_float(const Temporal *tnumber, double d);
1756extern Temporal *sub_tint_int(const Temporal *tnumber, int i);
1757extern Temporal *sub_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2);
1758extern Temporal *temporal_derivative(const Temporal *temp);
1759extern Temporal *tfloat_exp(const Temporal *temp);
1760extern Temporal *tfloat_ln(const Temporal *temp);
1761extern Temporal *tfloat_log10(const Temporal *temp);
1762extern Temporal *tnumber_abs(const Temporal *temp);
1763extern Temporal *tnumber_trend(const Temporal *temp);
1764extern double float_angular_difference(double degrees1, double degrees2);
1765extern Temporal *tnumber_angular_difference(const Temporal *temp);
1766extern Temporal *tnumber_delta_value(const Temporal *temp);
1767
1768/*****************************************************************************
1769 * Text functions for temporal types
1770 *****************************************************************************/
1771
1772extern Temporal *textcat_text_ttext(const text *txt, const Temporal *temp);
1773extern Temporal *textcat_ttext_text(const Temporal *temp, const text *txt);
1774extern Temporal *textcat_ttext_ttext(const Temporal *temp1, const Temporal *temp2);
1775extern Temporal *ttext_initcap(const Temporal *temp);
1776extern Temporal *ttext_upper(const Temporal *temp);
1777extern Temporal *ttext_lower(const Temporal *temp);
1778
1779/*****************************************************************************
1780 * Distance functions for temporal types
1781 *****************************************************************************/
1782
1783extern Temporal *tdistance_tfloat_float(const Temporal *temp, double d);
1784extern Temporal *tdistance_tint_int(const Temporal *temp, int i);
1785extern Temporal *tdistance_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2);
1786extern double nad_tboxfloat_tboxfloat(const TBox *box1, const TBox *box2);
1787extern int nad_tboxint_tboxint(const TBox *box1, const TBox *box2);
1788extern double nad_tfloat_float(const Temporal *temp, double d);
1789extern double nad_tfloat_tfloat(const Temporal *temp1, const Temporal *temp2);
1790extern double nad_tfloat_tbox(const Temporal *temp, const TBox *box);
1791extern int nad_tint_int(const Temporal *temp, int i);
1792extern int nad_tint_tbox(const Temporal *temp, const TBox *box);
1793extern int nad_tint_tint(const Temporal *temp1, const Temporal *temp2);
1794
1795/*****************************************************************************
1796 * Aggregate functions for temporal types
1797 *****************************************************************************/
1798
1799extern SkipList *tbool_tand_transfn(SkipList *state, const Temporal *temp);
1800extern SkipList *tbool_tor_transfn(SkipList *state, const Temporal *temp);
1801extern Span *temporal_extent_transfn(Span *s, const Temporal *temp);
1802extern SkipList *temporal_merge_transfn(SkipList *state, const Temporal *temp);
1803extern SkipList *temporal_merge_combinefn(SkipList *state1, SkipList *state2);
1805extern SkipList *temporal_tcount_transfn(SkipList *state, const Temporal *temp);
1806extern SkipList *tfloat_tmax_transfn(SkipList *state, const Temporal *temp);
1807extern SkipList *tfloat_tmin_transfn(SkipList *state, const Temporal *temp);
1808extern SkipList *tfloat_tsum_transfn(SkipList *state, const Temporal *temp);
1809extern SkipList *tfloat_wmax_transfn(SkipList *state, const Temporal *temp, const Interval *interv);
1810extern SkipList *tfloat_wmin_transfn(SkipList *state, const Temporal *temp, const Interval *interv);
1811extern SkipList *tfloat_wsum_transfn(SkipList *state, const Temporal *temp, const Interval *interv);
1813extern SkipList *tint_tmax_transfn(SkipList *state, const Temporal *temp);
1814extern SkipList *tint_tmin_transfn(SkipList *state, const Temporal *temp);
1815extern SkipList *tint_tsum_transfn(SkipList *state, const Temporal *temp);
1816extern SkipList *tint_wmax_transfn(SkipList *state, const Temporal *temp, const Interval *interv);
1817extern SkipList *tint_wmin_transfn(SkipList *state, const Temporal *temp, const Interval *interv);
1818extern SkipList *tint_wsum_transfn(SkipList *state, const Temporal *temp, const Interval *interv);
1819extern TBox *tnumber_extent_transfn(TBox *box, const Temporal *temp);
1820extern Temporal *tnumber_tavg_finalfn(SkipList *state);
1821extern SkipList *tnumber_tavg_transfn(SkipList *state, const Temporal *temp);
1822extern SkipList *tnumber_wavg_transfn(SkipList *state, const Temporal *temp, const Interval *interv);
1823extern SkipList *tstzset_tcount_transfn(SkipList *state, const Set *s);
1824extern SkipList *tstzspan_tcount_transfn(SkipList *state, const Span *s);
1825extern SkipList *tstzspanset_tcount_transfn(SkipList *state, const SpanSet *ss);
1826extern SkipList *ttext_tmax_transfn(SkipList *state, const Temporal *temp);
1827extern SkipList *ttext_tmin_transfn(SkipList *state, const Temporal *temp);
1828
1829/*****************************************************************************
1830 * Analytics functions for temporal types
1831 *****************************************************************************/
1832
1833/* Simplification functions for temporal types */
1834
1835extern Temporal *temporal_simplify_dp(const Temporal *temp, double eps_dist, bool synchronized);
1836extern Temporal *temporal_simplify_max_dist(const Temporal *temp, double eps_dist, bool synchronized);
1837extern Temporal *temporal_simplify_min_dist(const Temporal *temp, double dist);
1838extern Temporal *temporal_simplify_min_tdelta(const Temporal *temp, const Interval *mint);
1839
1840/*****************************************************************************/
1841
1842/* Reduction functions for temporal types */
1843
1844extern Temporal *temporal_tprecision(const Temporal *temp, const Interval *duration, TimestampTz origin);
1845extern Temporal *temporal_tsample(const Temporal *temp, const Interval *duration, TimestampTz origin, interpType interp);
1846
1847/*****************************************************************************/
1848
1849/* Similarity functions for temporal types */
1850
1851extern double temporal_dyntimewarp_distance(const Temporal *temp1, const Temporal *temp2);
1852extern Match *temporal_dyntimewarp_path(const Temporal *temp1, const Temporal *temp2, int *count);
1853extern double temporal_frechet_distance(const Temporal *temp1, const Temporal *temp2);
1854extern Match *temporal_frechet_path(const Temporal *temp1, const Temporal *temp2, int *count);
1855extern double temporal_hausdorff_distance(const Temporal *temp1, const Temporal *temp2);
1856
1857/*****************************************************************************/
1858
1859/* Tile functions for temporal types */
1860
1861extern Span *temporal_time_bins(const Temporal *temp, const Interval *duration, TimestampTz origin, int *count);
1862extern Temporal **temporal_time_split(const Temporal *temp, const Interval *duration, TimestampTz torigin, TimestampTz **time_bins, int *count);
1863extern TBox *tfloat_time_boxes(const Temporal *temp, const Interval *duration, TimestampTz torigin, int *count);
1864extern Span *tfloat_value_bins(const Temporal *temp, double vsize, double vorigin, int *count);
1865extern TBox *tfloat_value_boxes(const Temporal *temp, double vsize, double vorigin, int *count);
1866extern Temporal **tfloat_value_split(const Temporal *temp, double size, double origin, double **bins, int *count);
1867extern TBox *tfloat_value_time_boxes(const Temporal *temp, double vsize, const Interval *duration, double vorigin, TimestampTz torigin, int *count);
1868extern Temporal **tfloat_value_time_split(const Temporal *temp, double vsize, const Interval *duration, double vorigin, TimestampTz torigin, double **value_bins, TimestampTz **time_bins, int *count);
1869extern TBox *tfloatbox_time_tiles(const TBox *box, const Interval *duration, TimestampTz torigin, int *count);
1870extern TBox *tfloatbox_value_tiles(const TBox *box, double vsize, double vorigin, int *count);
1871extern TBox *tfloatbox_value_time_tiles(const TBox *box, double vsize, const Interval *duration, double vorigin, TimestampTz torigin, int *count);
1872extern TBox *tint_time_boxes(const Temporal *temp, const Interval *duration, TimestampTz torigin, int *count);
1873extern Span *tint_value_bins(const Temporal *temp, int vsize, int vorigin, int *count);
1874extern TBox *tint_value_boxes(const Temporal *temp, int vsize, int vorigin, int *count);
1875extern Temporal **tint_value_split(const Temporal *temp, int vsize, int vorigin, int **bins, int *count);
1876extern TBox *tint_value_time_boxes(const Temporal *temp, int vsize, const Interval *duration, int vorigin, TimestampTz torigin, int *count);
1877extern Temporal **tint_value_time_split(const Temporal *temp, int size, const Interval *duration, int vorigin, TimestampTz torigin, int **value_bins, TimestampTz **time_bins, int *count);
1878extern TBox *tintbox_time_tiles(const TBox *box, const Interval *duration, TimestampTz torigin, int *count);
1879extern TBox *tintbox_value_tiles(const TBox *box, int xsize, int xorigin, int *count);
1880extern TBox *tintbox_value_time_tiles(const TBox *box, int xsize, const Interval *duration, int xorigin, TimestampTz torigin, int *count);
1881
1882/*****************************************************************************/
1883
1884#endif
DateADT timestamptz_to_date(TimestampTz t)
Convert a timestamp with time zone into a date.
Definition: postgres_types.c:1444
char * text_out(const text *txt)
Return the string representation of a text value.
Definition: type_out.c:102
DateADT pg_date_in(const char *str)
Return a date from its string representation.
Definition: postgres_types.c:608
TimestampTz date_to_timestamptz(DateADT d)
Convert a date into a timestamptz.
Definition: postgres_types.c:829
text * text_lower(const text *txt)
Return the text value transformed to lowercase.
Definition: postgres_types.c:2426
double float_angular_difference(double degrees1, double degrees2)
Return the angular difference, i.e., the smaller angle between the two degree values.
Definition: tnumber_mathfuncs.c:487
DateADT add_date_int(DateADT d, int32 days)
Return the addition of a date and a number of days.
Definition: postgres_types.c:843
DateADT minus_date_int(DateADT d, int32 days)
Return the subtraction of a date and a number of days.
Definition: postgres_types.c:871
int int32_cmp(int32 l, int32 r)
Return -1, 0, or 1 depending on whether the first value is less than, equal to, or greater than the s...
Definition: type_util.c:80
TimestampTz add_timestamptz_interval(TimestampTz t, const Interval *interv)
Return the addition of a timestamp and an interval.
Definition: postgres_types.c:1895
int minus_date_date(DateADT d1, DateADT d2)
Return the subtraction of two dates.
Definition: postgres_types.c:899
double float_log10(double d)
Return the logarithm base 10 of a double.
Definition: tnumber_mathfuncs.c:849
Timestamp date_to_timestamp(DateADT dateVal)
Convert a date into a timestamp.
Definition: postgres_types.c:982
TimestampTz minus_timestamptz_interval(TimestampTz t, const Interval *interv)
Return the subtraction of a timestamptz and an interval.
Definition: postgres_types.c:1992
char * text2cstring(const text *txt)
Convert a text into a C string.
Definition: postgres_types.c:2275
char * pg_interval_out(const Interval *interv)
Return the string representation of an interval.
Definition: postgres_types.c:1803
int text_cmp(const text *txt1, const text *txt2)
Comparison function for text values.
Definition: postgres_types.c:2324
char * pg_date_out(DateADT d)
Return the string representation of a date.
Definition: postgres_types.c:711
double float_exp(double d)
Return the exponential of a double.
Definition: tnumber_mathfuncs.c:696
text * textcat_text_text(const text *txt1, const text *txt2)
Return the concatenation of the two text values.
Definition: postgres_types.c:2357
char * bool_out(bool b)
Return the string representation of a boolean.
Definition: postgres_types.c:225
Interval * interval_make(int32 years, int32 months, int32 weeks, int32 days, int32 hours, int32 mins, double secs)
Return an interval constructed from its arguments.
Definition: postgres_types.c:1751
Interval * minus_timestamptz_timestamptz(TimestampTz t1, TimestampTz t2)
Return the subtraction of two timestamptz values.
Definition: postgres_types.c:2045
text * text_upper(const text *txt)
Return the text value transformed to uppercase.
Definition: postgres_types.c:2458
bool bool_in(const char *str)
Return a boolean from its string representation.
Definition: postgres_types.c:190
int int64_cmp(int64 l, int64 r)
Return -1, 0, or 1 depending on whether the first value is less than, equal to, or greater than the s...
Definition: type_util.c:91
double float_round(double d, int maxdd)
Return a float number rounded to a given number of decimal places.
Definition: temporal.c:1258
double float_ln(double d)
Return the natural logarithm of a double.
Definition: tnumber_mathfuncs.c:777
DateADT timestamp_to_date(Timestamp t)
Convert a timestamp into a date.
Definition: postgres_types.c:996
Interval * mul_interval_double(const Interval *interv, double factor)
Return the multiplication of an interval and a factor.
Definition: postgres_types.c:2131
text * text_copy(const text *txt)
Copy a text value.
Definition: postgres_types.c:2340
text * cstring2text(const char *str)
Convert a C string into a text.
Definition: postgres_types.c:2256
Interval * pg_interval_in(const char *str, int32 typmod)
Return an interval from its string representation.
Definition: postgres_types.c:1655
TimestampTz timestamptz_shift(TimestampTz t, const Interval *interv)
Return a timestamptz shifted by an interval.
Definition: span.c:1335
Interval * add_interval_interval(const Interval *interv1, const Interval *interv2)
Return the addition of two intervals.
Definition: postgres_types.c:1842
text * text_initcap(const text *txt)
Convert the text value to initcap.
Definition: postgres_types.c:2490
uint32 tbox_hash(const TBox *box)
Return the 32-bit hash of a temporal box.
Definition: tbox.c:1824
bool tbox_tmin(const TBox *box, TimestampTz *result)
Return in the last argument the minimum T value of a temporal box.
Definition: tbox.c:971
bool tbox_xmax_inc(const TBox *box, bool *result)
Return in the last argument whether the maximum X value of a temporal box is inclusive.
Definition: tbox.c:952
bool tboxint_xmax(const TBox *box, int *result)
Return in the last argument the maximum X value of a temporal box.
Definition: tbox.c:910
bool tbox_tmax(const TBox *box, TimestampTz *result)
Return in the last argument the maximum T value of a temporal box.
Definition: tbox.c:1012
bool tboxint_xmin(const TBox *box, int *result)
Return in the last argument the minimum X value of a temporal box.
Definition: tbox.c:824
bool tbox_tmin_inc(const TBox *box, bool *result)
Return in the last argument whether the minimum T value of a temporal box is inclusive.
Definition: tbox.c:992
bool tbox_tmax_inc(const TBox *box, bool *result)
Return in the last argument whether the maximum T value of a temporal box is inclusive.
Definition: tbox.c:1033
bool tboxfloat_xmax(const TBox *box, double *result)
Return in the last argument the maximum X value of a temporal box.
Definition: tbox.c:930
bool tbox_xmin_inc(const TBox *box, bool *result)
Return in the last argument whether the minimum X value of a temporal box is inclusive.
Definition: tbox.c:866
bool tbox_hasx(const TBox *box)
Return true if a temporal box has value dimension.
Definition: tbox.c:773
bool tbox_hast(const TBox *box)
Return true if a temporal box has time dimension.
Definition: tbox.c:787
bool tboxfloat_xmin(const TBox *box, double *result)
Return in the last argument the minimum X value of a temporal box.
Definition: tbox.c:844
bool before_tbox_tbox(const TBox *box1, const TBox *box2)
Return true if the first temporal box is before the second one.
Definition: tbox.c:1529
bool overbefore_tbox_tbox(const TBox *box1, const TBox *box2)
Return true if the first temporal box is not after the second one.
Definition: tbox.c:1546
bool after_tbox_tbox(const TBox *box1, const TBox *box2)
Return true if the first temporal box is after the second one.
Definition: tbox.c:1563
bool left_tbox_tbox(const TBox *box1, const TBox *box2)
Return true if the first temporal box is to the left of the second one.
Definition: tbox.c:1457
bool overafter_tbox_tbox(const TBox *box1, const TBox *box2)
Return true if the first temporal box is not before the second one.
Definition: tbox.c:1580
bool right_tbox_tbox(const TBox *box1, const TBox *box2)
Return true if the first temporal box is to the right of the second one.
Definition: tbox.c:1494
bool overleft_tbox_tbox(const TBox *box1, const TBox *box2)
Return true if the first temporal box does not extend to the right of the second one.
Definition: tbox.c:1476
bool overright_tbox_tbox(const TBox *box1, const TBox *box2)
Return true if the first temporal box does not extend to the left of the second one.
Definition: tbox.c:1512
bool contains_tbox_tbox(const TBox *box1, const TBox *box2)
Return true if the first temporal box contains the second one.
Definition: tbox.c:1350
bool adjacent_tbox_tbox(const TBox *box1, const TBox *box2)
Return true if two temporal boxes are adjacent.
Definition: tbox.c:1428
bool overlaps_tbox_tbox(const TBox *box1, const TBox *box2)
Return true if two temporal boxes overlap.
Definition: tbox.c:1384
bool same_tbox_tbox(const TBox *box1, const TBox *box2)
Return true if two temporal boxes are equal in the common dimensions.
Definition: tbox.c:1406
bool contained_tbox_tbox(const TBox *box1, const TBox *box2)
Return true if the first temporal box is contained in the second one.
Definition: tbox.c:1372
bool tbox_gt(const TBox *box1, const TBox *box2)
Return true if the first temporal box is greater than the second one.
Definition: tbox.c:1809
bool tbox_ge(const TBox *box1, const TBox *box2)
Return true if the first temporal box is greater than or equal to the second one.
Definition: tbox.c:1796
bool tbox_le(const TBox *box1, const TBox *box2)
Return true if the first temporal box is less than or equal to the second one.
Definition: tbox.c:1783
bool tbox_lt(const TBox *box1, const TBox *box2)
Return true if the first temporal box is less than the second one.
Definition: tbox.c:1770
bool tbox_eq(const TBox *box1, const TBox *box2)
Return true if two temporal boxes are equal.
Definition: tbox.c:1696
int tbox_cmp(const TBox *box1, const TBox *box2)
Return -1, 0, or 1 depending on whether the first temporal box is less than, equal to,...
Definition: tbox.c:1732
bool tbox_ne(const TBox *box1, const TBox *box2)
Return true if two temporal boxes are different.
Definition: tbox.c:1718
TBox * numspan_tstzspan_to_tbox(const Span *span, const Span *s)
Return a temporal box from a number span and a timestamptz span.
Definition: tbox.c:349
TBox * tbox_copy(const TBox *box)
Return a copy of a temporal box.
Definition: tbox.c:213
TBox * int_tstzspan_to_tbox(int i, const Span *s)
Return a temporal box from an integer and a timestamptz span.
Definition: tbox.c:299
TBox * float_tstzspan_to_tbox(double d, const Span *s)
Return a temporal box from a float and a timestamptz span.
Definition: tbox.c:314
TBox * int_timestamptz_to_tbox(int i, TimestampTz t)
Return a temporal box from an integer and a timestamptz.
Definition: tbox.c:253
TBox * numspan_timestamptz_to_tbox(const Span *span, TimestampTz t)
Return a temporal box from a number span and a timestamptz.
Definition: tbox.c:330
TBox * float_timestamptz_to_tbox(double d, TimestampTz t)
Return a temporal box from a float and a timestamptz.
Definition: tbox.c:266
TBox * tbox_make(const Span *s, const Span *p)
Return a temporal box from a number span and a timestamptz span.
Definition: tbox.c:165
Span * tbox_to_tstzspan(const TBox *box)
Convert a temporal box into a timestamptz span.
Definition: tbox.c:753
TBox * int_to_tbox(int i)
Convert an integer into a temporal box.
Definition: tbox.c:419
Span * tbox_to_intspan(const TBox *box)
Convert a temporal box into an integer span.
Definition: tbox.c:690
TBox * set_to_tbox(const Set *s)
Convert a number or a timestamptz set into a temporal box.
Definition: tbox.c:553
TBox * float_to_tbox(double d)
Convert a float into a temporal box.
Definition: tbox.c:447
Span * tbox_to_floatspan(const TBox *box)
Convert a temporal box into a float span.
Definition: tbox.c:724
TBox * timestamptz_to_tbox(TimestampTz t)
Convert a timestamptz into a temporal box.
Definition: tbox.c:480
TBox * spanset_to_tbox(const SpanSet *ss)
Convert a number span set into a temporal box.
Definition: tbox.c:653
TBox * span_to_tbox(const Span *s)
Convert a number span into a temporal box.
Definition: tbox.c:616
TBox * tbox_in(const char *str)
Return a temporal box from its Well-Known Text (WKT) representation.
Definition: tbox.c:98
char * tbox_as_hexwkb(const TBox *box, uint8_t variant, size_t *size)
Return the ASCII hex-encoded Well-Known Binary (HexWKB) representation of a temporal box.
Definition: type_out.c:2489
TBox * tbox_from_wkb(const uint8_t *wkb, size_t size)
Return a temporal box from its Well-Known Binary (WKB) representation.
Definition: type_in.c:2208
uint8_t * tbox_as_wkb(const TBox *box, uint8_t variant, size_t *size_out)
Return the Well-Known Binary (WKB) representation of a temporal box.
Definition: type_out.c:2470
TBox * tbox_from_hexwkb(const char *hexwkb)
Return a temporal box from its ASCII hex-encoded Well-Known Binary (WKB) representation.
Definition: type_in.c:2223
char * tbox_out(const TBox *box, int maxdd)
Return the Well-Known Text (WKT) representation of a temporal box.
Definition: tbox.c:114
TBox * intersection_tbox_tbox(const TBox *box1, const TBox *box2)
Return the intersection of two temporal boxes.
Definition: tbox.c:1667
TBox * union_tbox_tbox(const TBox *box1, const TBox *box2, bool strict)
Return the union of two temporal boxes.
Definition: tbox.c:1602
TBox * tfloatbox_shift_scale(const TBox *box, double shift, double width, bool hasshift, bool haswidth)
Return a temporal box with the value span shifted and/or scaled by the values.
Definition: tbox.c:1141
TBox * tintbox_shift_scale(const TBox *box, int shift, int width, bool hasshift, bool haswidth)
Return a temporal box with the value span shifted and/or scaled by the values.
Definition: tbox.c:1118
TBox * tintbox_expand(const TBox *box, int i)
Return a temporal box with the value span expanded/decreased by an integer.
Definition: tbox.c:1211
TBox * tbox_expand_time(const TBox *box, const Interval *interv)
Return a temporal box with the time span expanded/decreased by an interval.
Definition: tbox.c:1304
TBox * tbox_shift_scale_time(const TBox *box, const Interval *shift, const Interval *duration)
Return a temporal box with the value span shifted and/or scaled by the values.
Definition: tbox.c:1163
TBox * tbox_round(const TBox *box, int maxdd)
Return a temporal box with the precision of the value span set to a number of decimal places.
Definition: tbox.c:1057
TBox * tfloatbox_expand(const TBox *box, double d)
Return a temporal box with the value span expanded/decreased by a double.
Definition: tbox.c:1240
int rtree_search(const RTree *rtree, RTreeSearchOp op, const void *query, MeosArray *result)
Search an RTree with a bounding box, collecting matching IDs into a MeosArray.
Definition: temporal_rtree.c:907
void rtree_insert(RTree *rtree, void *box, int id)
Insert a bounding box into the RTree index.
Definition: temporal_rtree.c:857
double tnumber_avg_value(const Temporal *temp)
Return the average value of a temporal number.
Definition: temporal.c:2052
void meos_array_add(MeosArray *array, void *value)
Add a value to the array.
Definition: meos_array.c:155
MeosArray * meos_array_create(int elem_size)
Create an expandable array.
Definition: meos_array.c:90
int meos_array_count(const MeosArray *array)
Return the number of elements in the array.
Definition: meos_array.c:211
void meos_array_reset_free(MeosArray *array)
Reset a varlength array, freeing the stored pointers and keeping the allocated memory for reuse.
Definition: meos_array.c:239
void meos_array_destroy(MeosArray *array)
Destroy the array, freeing its internal storage.
Definition: meos_array.c:120
void meos_array_reset(MeosArray *array)
Reset the array, keeping the allocated memory for reuse.
Definition: meos_array.c:226
void * meos_array_get(const MeosArray *array, int n)
Get the n-th element of the array (0-based)
Definition: meos_array.c:189
void meos_array_destroy_free(MeosArray *array)
Destroy a varlength array, freeing both the stored pointers and the internal storage.
Definition: meos_array.c:138
double * floatset_values(const Set *s)
Return the array of values of a float set.
Definition: set_meos.c:797
Set * datespanset_dates(const SpanSet *ss)
Return the set of dates of a span set.
Definition: spanset.c:782
int * intset_values(const Set *s)
Return the array of values of an integer set.
Definition: set_meos.c:761
text * textset_end_value(const Set *s)
Return a copy of the end value of a text set.
Definition: set_meos.c:592
int64 bigintspanset_lower(const SpanSet *ss)
Return the lower bound of an integer span set.
Definition: spanset_meos.c:385
Span * spanset_span(const SpanSet *ss)
Return the bounding span of a span set.
Definition: spanset.c:549
bool tstzspanset_timestamptz_n(const SpanSet *ss, int n, TimestampTz *result)
Return in the last argument the n-th timestamptz of a span set.
Definition: spanset.c:881
bool span_lower_inc(const Span *s)
Return true if the lower bound of a span is inclusive.
Definition: span_meos.c:547
uint64 spanset_hash_extended(const SpanSet *ss, uint64 seed)
Return the 64-bit hash value of a span set using a seed.
Definition: spanset.c:1579
Interval * tstzspan_duration(const Span *s)
Return the duration of a timestamptz span as an interval.
Definition: span.c:784
uint64 set_hash_extended(const Set *s, uint64 seed)
Return the 64-bit hash of a set using a seed.
Definition: set.c:1213
bool spanset_upper_inc(const SpanSet *ss)
Return true if the upper bound of a span set is inclusive.
Definition: spanset.c:606
Interval * datespan_duration(const Span *s)
Return the duration of a date span as an interval.
Definition: span.c:768
DateADT datespan_upper(const Span *s)
Return the upper bound of a date span.
Definition: span_meos.c:518
bool bigintset_value_n(const Set *s, int n, int64 *result)
Return in the last argument the n-th value of a big integer set.
Definition: set_meos.c:661
Span * spanset_start_span(const SpanSet *ss)
Return a copy to the the start span of a span set.
Definition: spanset.c:981
int intset_start_value(const Set *s)
Return the start value of an integer set.
Definition: set_meos.c:455
TimestampTz * tstzset_values(const Set *s)
Return the array of values of a timestamptz set.
Definition: set_meos.c:851
int intspan_upper(const Span *s)
Return the upper bound of an integer span.
Definition: span_meos.c:473
int datespanset_num_dates(const SpanSet *ss)
Return the number of dates of a span set.
Definition: spanset.c:708
bool textset_value_n(const Set *s, int n, text **result)
Return in the last argument a copy of the n-th value of a text set.
Definition: set_meos.c:701
int intspanset_upper(const SpanSet *ss)
Return the upper bound of an integer span set.
Definition: spanset_meos.c:432
double floatspanset_width(const SpanSet *ss, bool boundspan)
Return the width of a float span set.
Definition: spanset_meos.c:527
uint32 span_hash(const Span *s)
Return the 32-bit hash of a span.
Definition: span.c:1605
uint32 set_hash(const Set *s)
Return the 32-bit hash of a set.
Definition: set.c:1192
TimestampTz tstzspan_lower(const Span *s)
Return the lower bound of a timestamptz span.
Definition: span_meos.c:456
int64 bigintspanset_width(const SpanSet *ss, bool boundspan)
Return the width of an integer span set.
Definition: spanset_meos.c:511
Span * spanset_span_n(const SpanSet *ss, int i)
Return a copy of the n-th span of a span set.
Definition: spanset.c:1011
Span ** spanset_spanarr(const SpanSet *ss)
Return a C array with copies of the spans of a span set.
Definition: spanset.c:1045
int intset_end_value(const Set *s)
Return the end value of an integer set.
Definition: set_meos.c:547
double floatspanset_lower(const SpanSet *ss)
Return the lower bound of a float span set.
Definition: spanset_meos.c:400
int64 bigintspan_lower(const Span *s)
Return the lower bound of an integer span.
Definition: span_meos.c:411
TimestampTz tstzset_end_value(const Set *s)
Return the end value of a timestamptz set.
Definition: set_meos.c:622
TimestampTz tstzspanset_lower(const SpanSet *ss)
Return the lower bound of a timestamptz span set.
Definition: spanset_meos.c:415
DateADT datespanset_start_date(const SpanSet *ss)
Return the start date of a span set.
Definition: spanset.c:724
int tstzspanset_num_timestamps(const SpanSet *ss)
Return the number of timestamps of a span set.
Definition: spanset.c:806
int intspanset_width(const SpanSet *ss, bool boundspan)
Return the width of an integer span set.
Definition: spanset_meos.c:495
double floatspanset_upper(const SpanSet *ss)
Return the upper bound of a float span set.
Definition: spanset_meos.c:462
bool dateset_value_n(const Set *s, int n, DateADT *result)
Return in the last argument the n-th value of a date set.
Definition: set_meos.c:721
text * textset_start_value(const Set *s)
Return a copy of the start value of a text set.
Definition: set_meos.c:500
int64 * bigintset_values(const Set *s)
Return the array of values of a big integer set.
Definition: set_meos.c:779
TimestampTz tstzspan_upper(const Span *s)
Return the upper bound of a timestamptz span.
Definition: span_meos.c:533
int64 bigintspan_width(const Span *s)
Return the width of a big integer span.
Definition: span_meos.c:593
int64 bigintspan_upper(const Span *s)
Return the upper bound of an integer span.
Definition: span_meos.c:488
bool floatset_value_n(const Set *s, int n, double *result)
Return in the last argument the n-th value of a float set.
Definition: set_meos.c:681
DateADT datespan_lower(const Span *s)
Return the lower bound of a date span.
Definition: span_meos.c:441
double floatset_start_value(const Set *s)
Return the start value of a float set.
Definition: set_meos.c:485
Interval * datespanset_duration(const SpanSet *ss, bool boundspan)
Return the duration of a date span set.
Definition: spanset.c:647
int spanset_num_spans(const SpanSet *ss)
Return the number of spans of a span set.
Definition: spanset.c:966
double floatspan_width(const Span *s)
Return the width of a float span.
Definition: span_meos.c:608
uint64 tbox_hash_extended(const TBox *box, uint64 seed)
Return the 64-bit hash of a temporal box using a seed.
Definition: tbox.c:1864
Interval * tstzspanset_duration(const SpanSet *ss, bool boundspan)
Return the duration of a timestamptz span set.
Definition: spanset.c:679
DateADT * dateset_values(const Set *s)
Return the array of values of a date set.
Definition: set_meos.c:833
int intspan_width(const Span *s)
Return the width of an integer span.
Definition: span_meos.c:578
int set_num_values(const Set *s)
Return the number of values of a set.
Definition: set.c:632
uint64 span_hash_extended(const Span *s, uint64 seed)
Return the 64-bit hash of a span using a seed.
Definition: span.c:1653
uint32 spanset_hash(const SpanSet *ss)
Return the 32-bit hash value of a span set.
Definition: spanset.c:1557
Span * spanset_end_span(const SpanSet *ss)
Return a copy of the end span of a span set.
Definition: spanset.c:996
int64 bigintset_end_value(const Set *s)
Return the end value of a big integer set.
Definition: set_meos.c:562
int64 bigintset_start_value(const Set *s)
Return the start value of a big integer set.
Definition: set_meos.c:470
bool span_upper_inc(const Span *s)
Return true if the upper bound of a span is inclusive.
Definition: span_meos.c:561
bool tstzset_value_n(const Set *s, int n, TimestampTz *result)
Return in the last argument the n-th value of a timestamptz set.
Definition: set_meos.c:741
DateADT dateset_start_value(const Set *s)
Return the start value of a date set.
Definition: set_meos.c:515
DateADT dateset_end_value(const Set *s)
Return the end value of a date set.
Definition: set_meos.c:607
TimestampTz tstzspanset_start_timestamptz(const SpanSet *ss)
Return the start timestamptz of a span set.
Definition: spanset.c:847
int intspan_lower(const Span *s)
Return the lower bound of an integer span.
Definition: span_meos.c:396
text ** textset_values(const Set *s)
Return the array of copies of the values of a text set.
Definition: set_meos.c:815
bool spanset_lower_inc(const SpanSet *ss)
Return true if the lower bound of a span set is inclusive.
Definition: spanset.c:592
double floatspan_lower(const Span *s)
Return the lower bound of a float span.
Definition: span_meos.c:426
double floatspan_upper(const Span *s)
Return the upper bound of a float span.
Definition: span_meos.c:503
TimestampTz tstzspanset_end_timestamptz(const SpanSet *ss)
Return the end timestamptz of a span set.
Definition: spanset.c:863
DateADT datespanset_end_date(const SpanSet *ss)
Return the end date of a span set.
Definition: spanset.c:740
TimestampTz tstzspanset_upper(const SpanSet *ss)
Return the upper bound of a timestamptz span set.
Definition: spanset_meos.c:477
Set * tstzspanset_timestamps(const SpanSet *ss)
Return the set of timestamps of a span set.
Definition: spanset.c:935
TimestampTz tstzset_start_value(const Set *s)
Return the start value of a timestamptz set.
Definition: set_meos.c:530
bool intset_value_n(const Set *s, int n, int *result)
Return in the last argument the n-th value of an integer set.
Definition: set_meos.c:641
int64 bigintspanset_upper(const SpanSet *ss)
Return the upper bound of an integer span set.
Definition: spanset_meos.c:447
double floatset_end_value(const Set *s)
Return the end value of a float set.
Definition: set_meos.c:577
int intspanset_lower(const SpanSet *ss)
Return the lower bound of an integer span set.
Definition: spanset_meos.c:370
bool datespanset_date_n(const SpanSet *ss, int n, DateADT *result)
Return in the last argument the n-th date of a date span set.
Definition: spanset.c:758
Span * timestamptz_extent_transfn(Span *state, TimestampTz t)
Transition function for span extent aggregate of timestamptz.
Definition: span_aggfuncs_meos.c:116
Set * text_union_transfn(Set *state, const text *txt)
Transition function for set union aggregate of texts.
Definition: set_aggfuncs_meos.c:362
Span * bigint_extent_transfn(Span *state, int64 i)
Transition function for span extent aggregate of big integers.
Definition: span_aggfuncs_meos.c:71
Set * set_union_transfn(Set *state, Set *s)
Transition function for set union aggregate of sets.
Definition: set_aggfuncs_meos.c:230
Span * float_extent_transfn(Span *state, double d)
Transition function for span extent aggregate of floats.
Definition: span_aggfuncs_meos.c:86
Set * set_union_finalfn(Set *state)
Final function for set union aggregate.
Definition: set_aggfuncs_meos.c:259
Span * spanset_extent_transfn(Span *state, const SpanSet *ss)
Transition function for span extent aggregate of span sets.
Definition: span_aggfuncs.c:134
Set * int_union_transfn(Set *state, int32 i)
Transition function for set union aggregate of integers.
Definition: set_aggfuncs_meos.c:287
SpanSet * span_union_transfn(SpanSet *state, const Span *s)
Transition function for span set aggregate union.
Definition: span_aggfuncs_meos.c:228
Set * bigint_union_transfn(Set *state, int64 i)
Transition function for set union aggregate of big integers.
Definition: set_aggfuncs_meos.c:302
Set * float_union_transfn(Set *state, double d)
Transition function for set union aggregate of floats.
Definition: set_aggfuncs_meos.c:317
Span * span_extent_transfn(Span *state, const Span *s)
Transition function for span extent aggregate of spans.
Definition: span_aggfuncs.c:107
SpanSet * spanset_union_finalfn(SpanSet *state)
Transition function for set aggregate of values.
Definition: span_aggfuncs_meos.c:284
Span * set_extent_transfn(Span *state, const Set *s)
Transition function for span extent aggregate of sets.
Definition: span_aggfuncs.c:77
Span * int_extent_transfn(Span *state, int i)
Transition function for span extent aggregate of integers.
Definition: span_aggfuncs_meos.c:56
Set * date_union_transfn(Set *state, DateADT d)
Transition function for set union aggregate of dates.
Definition: set_aggfuncs_meos.c:332
Span * date_extent_transfn(Span *state, DateADT d)
Transition function for span extent aggregate of dates.
Definition: span_aggfuncs_meos.c:101
SpanSet * spanset_union_transfn(SpanSet *state, const SpanSet *ss)
Transition function for span set aggregate union.
Definition: span_aggfuncs_meos.c:258
Set * timestamptz_union_transfn(Set *state, TimestampTz t)
Transition function for set union aggregate of timestamptz.
Definition: set_aggfuncs_meos.c:347
Span * set_split_each_n_spans(const Set *s, int elems_per_span, int *count)
Return an array of spans from a set obtained by merging consecutive elements.
Definition: span.c:1451
Span * spanset_spans(const SpanSet *ss)
Return the array of spans of a spanset.
Definition: spanset.c:1275
Span * set_split_n_spans(const Set *s, int span_count, int *count)
Return an array of N spans from the values of a set.
Definition: span.c:1404
Span * spanset_split_n_spans(const SpanSet *ss, int span_count, int *count)
Return an array of N spans from the composing spans of a spanset.
Definition: spanset.c:1338
Span * spanset_split_each_n_spans(const SpanSet *ss, int elems_per_span, int *count)
Return an array of N spans from a spanset obtained by merging consecutive composing spans.
Definition: spanset.c:1389
Span * set_spans(const Set *s)
Return an array of spans from the values of a set.
Definition: span.c:1383
double float_get_bin(double value, double vsize, double vorigin)
Return the initial value of the bin that contains a float.
Definition: temporal_tile.c:174
int64 bigint_get_bin(int64 value, int64 vsize, int64 vorigin)
Return the initial value of the bin that contains an integer.
Definition: temporal_tile.c:122
Span * intspanset_bins(const SpanSet *ss, int vsize, int vorigin, int *count)
Return the bins of an integer span set.
Definition: span_tile_meos.c:156
DateADT date_get_bin(DateADT d, const Interval *duration, DateADT torigin)
Return the initial date of the bin that contains a date.
Definition: temporal_tile.c:237
TimestampTz timestamptz_get_bin(TimestampTz t, const Interval *duration, TimestampTz torigin)
Return the initial timestamp of the bin that contains a timestamptz.
Definition: temporal_tile.c:313
int int_get_bin(int value, int vsize, int vorigin)
Return the initial value of the bin that contains an integer.
Definition: temporal_tile.c:70
Span * floatspan_bins(const Span *s, double vsize, double vorigin, int *count)
Return the bins of a float span.
Definition: span_tile_meos.c:102
Span * datespanset_bins(const SpanSet *ss, const Interval *duration, DateADT torigin, int *count)
Return the bins of a date span set.
Definition: span_tile_meos.c:209
Span * tstzspan_bins(const Span *s, const Interval *duration, TimestampTz origin, int *count)
Return the bins of a timestamptz span.
Definition: span_tile_meos.c:136
Span * datespan_bins(const Span *s, const Interval *duration, DateADT torigin, int *count)
Return the bins of a date span.
Definition: span_tile_meos.c:118
Span * floatspanset_bins(const SpanSet *ss, double vsize, double vorigin, int *count)
Return the bins of a float span set.
Definition: span_tile_meos.c:191
Span * tstzspanset_bins(const SpanSet *ss, const Interval *duration, TimestampTz torigin, int *count)
Return the bins of a timestamptz span set.
Definition: span_tile_meos.c:227
Span * bigintspanset_bins(const SpanSet *ss, int64 vsize, int64 vorigin, int *count)
Return the bins of a big integer span set.
Definition: span_tile_meos.c:173
Span * bigintspan_bins(const Span *s, int64 vsize, int64 vorigin, int *count)
Return the bins of a big integer span.
Definition: span_tile_meos.c:86
Span * intspan_bins(const Span *s, int vsize, int vorigin, int *count)
Return the bins of an integer span.
Definition: span_tile_meos.c:70
bool span_eq(const Span *s1, const Span *s2)
Return true if the two spans are equal.
Definition: span.c:1489
bool spanset_eq(const SpanSet *ss1, const SpanSet *ss2)
Return true if the two span sets are equal.
Definition: spanset.c:1426
int set_cmp(const Set *s1, const Set *s2)
Return -1, 0, or 1 depending on whether the first set is less than, equal to, or greater than the sec...
Definition: set.c:1105
bool set_ge(const Set *s1, const Set *s2)
Return true if the first set is greater than or equal to the second one.
Definition: set.c:1174
bool spanset_le(const SpanSet *ss1, const SpanSet *ss2)
Return true if the first span set is less than or equal to the second one.
Definition: spanset.c:1513
bool span_lt(const Span *s1, const Span *s2)
Return true if the first span is less than the second one.
Definition: span.c:1551
bool set_ne(const Set *s1, const Set *s2)
Return true if the first set is not equal to the second one.
Definition: set.c:1090
bool set_eq(const Set *s1, const Set *s2)
Return true if the two sets are equal.
Definition: set.c:1067
bool spanset_lt(const SpanSet *ss1, const SpanSet *ss2)
Return true if the first span set is less than the second one.
Definition: spanset.c:1500
int span_cmp(const Span *s1, const Span *s2)
Return -1, 0, or 1 depending on whether the first span is less than, equal to, or greater than the se...
Definition: span.c:1523
bool set_lt(const Set *s1, const Set *s2)
Return true if the first set is less than the second one.
Definition: set.c:1138
bool span_gt(const Span *s1, const Span *s2)
Return true if the first span is greater than the second one.
Definition: span.c:1588
int spanset_cmp(const SpanSet *ss1, const SpanSet *ss2)
Return -1, 0, or 1 depending on whether the first span set is less than, equal to,...
Definition: spanset.c:1464
bool spanset_gt(const SpanSet *ss1, const SpanSet *ss2)
Return true if the first span set is greater than the second one.
Definition: spanset.c:1538
bool spanset_ge(const SpanSet *ss1, const SpanSet *ss2)
Return true if the first span set is greater than or equal to the second one.
Definition: spanset.c:1526
bool spanset_ne(const SpanSet *ss1, const SpanSet *ss2)
Return true if the first span set is different from the second one.
Definition: spanset.c:1449
bool span_le(const Span *s1, const Span *s2)
Return true if the first span is less than or equal to the second one.
Definition: span.c:1563
bool span_ne(const Span *s1, const Span *s2)
Return true if the first span is different from the second one.
Definition: span.c:1508
bool span_ge(const Span *s1, const Span *s2)
Return true if the first span is greater than or equal to the second one.
Definition: span.c:1576
bool set_gt(const Set *s1, const Set *s2)
Return true if the first set is greater than the second one.
Definition: set.c:1162
bool set_le(const Set *s1, const Set *s2)
Return true if the first set is less than or equal to the second one.
Definition: set.c:1150
SpanSet * spanset_copy(const SpanSet *ss)
Return a copy of a span set.
Definition: spanset.c:372
Span * datespan_make(DateADT lower, DateADT upper, bool lower_inc, bool upper_inc)
Return a date span from the bounds.
Definition: span_meos.c:276
Span * floatspan_make(double lower, double upper, bool lower_inc, bool upper_inc)
Return a float span from the bounds.
Definition: span_meos.c:259
Set * dateset_make(const DateADT *values, int count)
Return a date set from an array of values.
Definition: set_meos.c:325
Set * set_copy(const Set *s)
Return a copy of a set.
Definition: set.c:503
Span * tstzspan_make(TimestampTz lower, TimestampTz upper, bool lower_inc, bool upper_inc)
Return a timestamptz span from the bounds.
Definition: span_meos.c:292
Set * intset_make(const int *values, int count)
Return an integer set from an array of values.
Definition: set_meos.c:241
Span * intspan_make(int lower, int upper, bool lower_inc, bool upper_inc)
Return an integer span from the bounds.
Definition: span_meos.c:225
Set * tstzset_make(const TimestampTz *values, int count)
Return a timestamptz set from an array of values.
Definition: set_meos.c:346
Set * textset_make(text **values, int count)
Return a text set from an array of values.
Definition: set_meos.c:304
Set * floatset_make(const double *values, int count)
Return a float set from an array of values.
Definition: set_meos.c:283
Span * span_copy(const Span *s)
Return a copy of a span.
Definition: span.c:496
Set * bigintset_make(const int64 *values, int count)
Return a big integer set from an array of values.
Definition: set_meos.c:262
Span * bigintspan_make(int64 lower, int64 upper, bool lower_inc, bool upper_inc)
Return a big integer span from the bounds.
Definition: span_meos.c:242
SpanSet * spanset_make(Span *spans, int count)
Return a span set from an array of disjoint spans.
Definition: spanset.c:335
Span * int_to_span(int i)
Convert an integer into a span.
Definition: span_meos.c:313
Span * floatspan_to_intspan(const Span *s)
Convert a float span into an integer span.
Definition: span.c:659
SpanSet * timestamptz_to_spanset(TimestampTz t)
Convert a timestamptz into a span set.
Definition: spanset_meos.c:269
Set * dateset_to_tstzset(const Set *s)
Convert a date set into a timestamptz set.
Definition: set.c:574
Set * date_to_set(DateADT d)
Convert a date into a set.
Definition: set_meos.c:424
Span * tstzspan_to_datespan(const Span *s)
Convert a timestamptz span into a date span.
Definition: span.c:735
SpanSet * span_to_spanset(const Span *s)
Convert a span into a span set.
Definition: spanset.c:446
Span * intspan_to_floatspan(const Span *s)
Convert an integer span into a float span.
Definition: span.c:627
SpanSet * datespanset_to_tstzspanset(const SpanSet *ss)
Convert a date span set into a timestamptz span set.
Definition: spanset.c:496
SpanSet * int_to_spanset(int i)
Convert an integer into a span set.
Definition: spanset_meos.c:221
SpanSet * float_to_spanset(double d)
Convert a float into a span set.
Definition: spanset_meos.c:245
Set * int_to_set(int i)
Convert an integer into a set.
Definition: set_meos.c:370
Span * set_to_span(const Set *s)
Convert a set into a span.
Definition: span.c:594
Set * text_to_set(const text *txt)
Convert a text into a set.
Definition: set_meos.c:409
Span * datespan_to_tstzspan(const Span *s)
Convert a date span into a timestamptz span.
Definition: span.c:693
SpanSet * set_to_spanset(const Set *s)
Convert a set into a span set.
Definition: spanset.c:429
Set * tstzset_to_dateset(const Set *s)
Convert a timestamptz set into a date set.
Definition: set.c:593
Span * timestamptz_to_span(TimestampTz t)
Convert a timestamptz into a span.
Definition: span_meos.c:376
SpanSet * intspanset_to_floatspanset(const SpanSet *ss)
Convert an integer span set into a float span set.
Definition: spanset.c:462
SpanSet * date_to_spanset(DateADT d)
Convert a date into a span set.
Definition: spanset_meos.c:257
Set * floatset_to_intset(const Set *s)
Convert a float set into an integer set.
Definition: set.c:556
SpanSet * tstzspanset_to_datespanset(const SpanSet *ss)
Convert a timestamptz span set into a date span set.
Definition: spanset.c:513
Set * float_to_set(double d)
Convert a float into a set.
Definition: set_meos.c:396
Set * bigint_to_set(int64 i)
Convert a big integer into a set.
Definition: set_meos.c:383
Set * timestamptz_to_set(TimestampTz t)
Convert a timestamptz into a set.
Definition: set_meos.c:437
SpanSet * bigint_to_spanset(int i)
Convert a big integer into a span set.
Definition: spanset_meos.c:233
Span * date_to_span(DateADT d)
Convert a date into a span.
Definition: span_meos.c:360
Span * float_to_span(double d)
Convert a float into a span.
Definition: span_meos.c:345
Set * intset_to_floatset(const Set *s)
Convert an integer set into a float set.
Definition: set.c:538
Span * bigint_to_span(int i)
Convert a big integer into a span.
Definition: span_meos.c:329
SpanSet * floatspanset_to_intspanset(const SpanSet *ss)
Convert a float span set into an integer span set.
Definition: spanset.c:479
int distance_span_int(const Span *s, int i)
Return the distance between a span and an integer as a double.
Definition: span_ops_meos.c:1286
int distance_datespanset_datespan(const SpanSet *ss, const Span *s)
Return the distance in days between a date span set and a span.
Definition: spanset_ops_meos.c:1410
double distance_set_float(const Set *s, double d)
Return the distance between a set and a float.
Definition: set_ops_meos.c:1568
int distance_intset_intset(const Set *s1, const Set *s2)
Return the distance between two integer sets.
Definition: set_ops_meos.c:1618
double distance_tstzspanset_tstzspan(const SpanSet *ss, const Span *s)
Return the distance in seconds between a timestamptz span set and a span.
Definition: spanset_ops_meos.c:1427
int64 distance_bigintspan_bigintspan(const Span *s1, const Span *s2)
Return the distance between two big integer spans.
Definition: span_ops_meos.c:1383
int64 distance_span_bigint(const Span *s, int64 i)
Return the distance between a span and a big integer as a double.
Definition: span_ops_meos.c:1302
int distance_set_date(const Set *s, DateADT d)
Return the distance in days between a set and a date.
Definition: set_ops_meos.c:1584
int distance_span_date(const Span *s, DateADT d)
Return the distance in days between a span and a date as a double.
Definition: span_ops_meos.c:1334
double distance_floatspanset_floatspanset(const SpanSet *ss1, const SpanSet *ss2)
Return the distance between two float span sets.
Definition: spanset_ops_meos.c:1474
int distance_set_int(const Set *s, int i)
Return the distance between a set and an integer.
Definition: set_ops_meos.c:1536
double distance_floatset_floatset(const Set *s1, const Set *s2)
Return the distance between two float sets.
Definition: set_ops_meos.c:1650
double distance_span_timestamptz(const Span *s, TimestampTz t)
Return the distance in seconds between a span and a timestamptz as a double.
Definition: span_ops_meos.c:1351
int distance_intspanset_intspan(const SpanSet *ss, const Span *s)
Return the distance between an integer span set and a span.
Definition: spanset_ops_meos.c:1362
int distance_spanset_date(const SpanSet *ss, DateADT d)
Return the distance in seconds between a span set and a date as a double.
Definition: spanset_ops_meos.c:1328
double distance_spanset_float(const SpanSet *ss, double d)
Return the distance between a span set and a float.
Definition: spanset_ops_meos.c:1311
int64 distance_bigintset_bigintset(const Set *s1, const Set *s2)
Return the distance between two big integer sets.
Definition: set_ops_meos.c:1634
double distance_span_float(const Span *s, double d)
Return the distance between a span and a float.
Definition: span_ops_meos.c:1318
int64 distance_spanset_bigint(const SpanSet *ss, int64 i)
Return the distance between a span set and a big integer.
Definition: spanset_ops_meos.c:1295
int64 distance_bigintspanset_bigintspan(const SpanSet *ss, const Span *s)
Return the distance between a big integer span set and a span.
Definition: spanset_ops_meos.c:1378
int distance_datespanset_datespanset(const SpanSet *ss1, const SpanSet *ss2)
Return the distance in days between two date span sets.
Definition: spanset_ops_meos.c:1489
double distance_set_timestamptz(const Set *s, TimestampTz t)
Return the distance in seconds between a set and a timestamptz as a double.
Definition: set_ops_meos.c:1601
double distance_floatspan_floatspan(const Span *s1, const Span *s2)
Return the distance between two float spans.
Definition: span_ops_meos.c:1398
int distance_intspan_intspan(const Span *s1, const Span *s2)
Return the distance between two integer spans.
Definition: span_ops_meos.c:1368
int64 distance_bigintspanset_bigintspanset(const SpanSet *ss1, const SpanSet *ss2)
Return the distance between two big integer span sets.
Definition: spanset_ops_meos.c:1459
int distance_datespan_datespan(const Span *s1, const Span *s2)
Return the distance between two date spans.
Definition: span_ops_meos.c:1413
double distance_tstzspan_tstzspan(const Span *s1, const Span *s2)
Return the distance in seconds between two timestamptz spans.
Definition: span_ops_meos.c:1428
int distance_intspanset_intspanset(const SpanSet *ss1, const SpanSet *ss2)
Return the distance between two integer span sets.
Definition: spanset_ops_meos.c:1444
double distance_tstzspanset_tstzspanset(const SpanSet *ss1, const SpanSet *ss2)
Return the distance in seconds between two timestamptz span sets.
Definition: spanset_ops_meos.c:1504
int distance_spanset_int(const SpanSet *ss, int i)
Return the distance between a span set and an integer.
Definition: spanset_ops_meos.c:1279
double distance_floatspanset_floatspan(const SpanSet *ss, const Span *s)
Return the distance between a float span set and a span.
Definition: spanset_ops_meos.c:1394
double distance_tstzset_tstzset(const Set *s1, const Set *s2)
Return the distance in seconds between two timestamptz sets.
Definition: set_ops_meos.c:1682
double distance_spanset_timestamptz(const SpanSet *ss, TimestampTz t)
Return the distance in seconds between a span set and a timestamptz.
Definition: spanset_ops_meos.c:1344
int distance_dateset_dateset(const Set *s1, const Set *s2)
Return the distance in days between two date sets.
Definition: set_ops_meos.c:1666
int64 distance_set_bigint(const Set *s, int64 i)
Return the distance between a set and a big integer.
Definition: set_ops_meos.c:1552
Set * set_from_wkb(const uint8_t *wkb, size_t size)
Return a set from its Well-Known Binary (WKB) representation.
Definition: type_in.c:2106
SpanSet * datespanset_in(const char *str)
Return a date set from its Well-Known Text (WKT) representation.
Definition: spanset_meos.c:111
Set * floatset_in(const char *str)
Return a set from its Well-Known Text (WKT) representation.
Definition: set_meos.c:93
Set * tstzset_in(const char *str)
Return a set from its Well-Known Text (WKT) representation.
Definition: set_meos.c:135
Span * span_from_wkb(const uint8_t *wkb, size_t size)
Return a span from its Well-Known Binary (WKB) representation.
Definition: type_in.c:2139
SpanSet * spanset_from_wkb(const uint8_t *wkb, size_t size)
Return a span set from its Well-Known Binary (WKB) representation.
Definition: type_in.c:2172
SpanSet * bigintspanset_in(const char *str)
Return a big integer span from its Well-Known Text (WKT) representation.
Definition: spanset_meos.c:83
char * floatspanset_out(const SpanSet *ss, int maxdd)
Return the Well-Known Text (WKT) representation of a float span set.
Definition: spanset_meos.c:171
char * tstzset_out(const Set *set)
Return the string representation of a timestamptz set.
Definition: set_meos.c:222
Span * intspan_in(const char *str)
Return an integer span from its Well-Known Text (WKT) representation.
Definition: span_meos.c:67
SpanSet * floatspanset_in(const char *str)
Return a float span from its Well-Known Text (WKT) representation.
Definition: spanset_meos.c:97
uint8_t * spanset_as_wkb(const SpanSet *ss, uint8_t variant, size_t *size_out)
Return the Well-Known Binary (WKB) representation of a span set.
Definition: type_out.c:2430
char * datespanset_out(const SpanSet *ss)
Return the Well-Known Text (WKT) representation of a date span set.
Definition: spanset_meos.c:185
char * textset_out(const Set *set)
Return the string representation of a text set.
Definition: set_meos.c:194
Set * intset_in(const char *str)
Return a set from its Well-Known Text (WKT) representation.
Definition: set_meos.c:65
Set * bigintset_in(const char *str)
Return a set from its Well-Known Text (WKT) representation.
Definition: set_meos.c:79
SpanSet * spanset_from_hexwkb(const char *hexwkb)
Return a span set from its ASCII hex-encoded Well-Known Binary (WKB) representation.
Definition: type_in.c:2187
char * dateset_out(const Set *s)
Return the string representation of a date set.
Definition: set_meos.c:208
char * floatset_out(const Set *set, int maxdd)
Return the string representation of a float set.
Definition: set_meos.c:180
char * floatspan_out(const Span *s, int maxdd)
Return the Well-Known Text (WKT) representation of a float span.
Definition: span_meos.c:176
Span * datespan_in(const char *str)
Return a date span from its Well-Known Text (WKT) representation.
Definition: span_meos.c:112
uint8_t * set_as_wkb(const Set *s, uint8_t variant, size_t *size_out)
Return the Well-Known Binary (WKB) representation of a set.
Definition: type_out.c:2354
Set * textset_in(const char *str)
Return a set from its Well-Known Text (WKT) representation.
Definition: set_meos.c:107
Span * floatspan_in(const char *str)
Return a float span from its Well-Known Text (WKT) representation.
Definition: span_meos.c:97
Span * tstzspan_in(const char *str)
Return a timestamptz span from its Well-Known Text (WKT) representation.
Definition: span_meos.c:128
Span * bigintspan_in(const char *str)
Return an integer span from its Well-Known Text (WKT) representation.
Definition: span_meos.c:82
char * set_as_hexwkb(const Set *s, uint8_t variant, size_t *size_out)
Return the ASCII hex-encoded Well-Known Binary (HexWKB) representation of a set.
Definition: type_out.c:2372
char * tstzspan_out(const Span *s)
Return the Well-Known Text (WKT) representation of a timestamtz span.
Definition: span_meos.c:206
Set * dateset_in(const char *str)
Return a set from its Well-Known Text (WKT) representation.
Definition: set_meos.c:121
char * intspanset_out(const SpanSet *ss)
Return the Well-Known Text (WKT) representation of an integer span set.
Definition: spanset_meos.c:142
Span * span_from_hexwkb(const char *hexwkb)
Return a span from its ASCII hex-encoded Well-Known Binary (WKB) representation.
Definition: type_in.c:2155
SpanSet * intspanset_in(const char *str)
Return an integer span from its Well-Known Text (WKT) representation.
Definition: spanset_meos.c:68
char * datespan_out(const Span *s)
Return the Well-Known Text (WKT) representation of a date span.
Definition: span_meos.c:191
char * span_as_hexwkb(const Span *s, uint8_t variant, size_t *size_out)
Return the ASCII hex-encoded Well-Known Binary (HexWKB) representation of a span.
Definition: type_out.c:2410
SpanSet * tstzspanset_in(const char *str)
Return a timestamptz set from its Well-Known Text (WKT) representation.
Definition: spanset_meos.c:126
char * bigintspanset_out(const SpanSet *ss)
Return the Well-Known Text (WKT) representation of a big integer span set.
Definition: spanset_meos.c:156
char * spanset_as_hexwkb(const SpanSet *ss, uint8_t variant, size_t *size_out)
Return the ASCII hex-encoded Well-Known Binary (HexWKB) representation of a span set.
Definition: type_out.c:2448
char * tstzspanset_out(const SpanSet *ss)
Return the Well-Known Text (WKT) representation of a timpespantz span set.
Definition: spanset_meos.c:199
uint8_t * span_as_wkb(const Span *s, uint8_t variant, size_t *size_out)
Return the Well-Known Binary (WKB) representation of a span.
Definition: type_out.c:2392
char * intspan_out(const Span *s)
Return the Well-Known Text (WKT) representation of an integer span.
Definition: span_meos.c:145
char * bigintspan_out(const Span *s)
Return the Well-Known Text (WKT) representation of a big integer span.
Definition: span_meos.c:160
Set * set_from_hexwkb(const char *hexwkb)
Return a set from its ASCII hex-encoded Well-Known Binary (WKB) representation.
Definition: type_in.c:2122
char * bigintset_out(const Set *set)
Return the string representation of a big integer set.
Definition: set_meos.c:165
char * intset_out(const Set *set)
Return the string representation of an integer set.
Definition: set_meos.c:151
bool overleft_span_int(const Span *s, int i)
Return true if a span does not extend to the right of an integer.
Definition: span_ops_meos.c:672
bool overbefore_set_date(const Set *s, DateADT d)
Return true if a set is not after a date.
Definition: set_ops_meos.c:776
bool after_date_spanset(DateADT d, const SpanSet *ss)
Return true if a date is after a span set.
Definition: spanset_ops_meos.c:477
bool overbefore_span_timestamptz(const Span *s, TimestampTz t)
Return true if a span is not after a timestamptz.
Definition: span_ops_meos.c:732
bool overleft_span_float(const Span *s, double d)
Return true if a span does not extend to the right of a float.
Definition: span_ops_meos.c:702
bool left_bigint_set(int64 i, const Set *s)
Return true if a big integer is to the left of a set.
Definition: set_ops_meos.c:263
bool left_int_span(int i, const Span *s)
Return true if an integer is to the left of a span.
Definition: span_ops_meos.c:284
bool left_spanset_int(const SpanSet *ss, int i)
Return true if a span set is to the left of an integer.
Definition: spanset_ops_meos.c:359
bool right_float_set(double d, const Set *s)
Return true if a float is to the right of a set.
Definition: set_ops_meos.c:466
bool right_span_spanset(const Span *s, const SpanSet *ss)
Return true if a span is to the right of a span set.
Definition: spanset_ops.c:538
bool overbefore_date_set(DateADT d, const Set *s)
Return true if a date is not after a set.
Definition: set_ops_meos.c:683
bool left_int_spanset(int i, const SpanSet *ss)
Return true if an integer is to the left of a span set.
Definition: spanset_ops_meos.c:282
bool before_span_timestamptz(const Span *s, TimestampTz t)
Return true if a span is before a timestamptz.
Definition: span_ops_meos.c:420
bool overright_spanset_float(const SpanSet *ss, double d)
Return true if a span set does not extend to the left of a float.
Definition: spanset_ops_meos.c:839
bool before_set_timestamptz(const Set *s, TimestampTz t)
Return true if a set is before a timestamptz.
Definition: set_ops_meos.c:416
bool overleft_bigint_spanset(int64 i, const SpanSet *ss)
Return true if a big integer does not extend to the right of a span set.
Definition: spanset_ops_meos.c:668
bool right_text_set(const text *txt, const Set *s)
Return true if a text is to the right of a set.
Definition: set_ops_meos.c:481
bool left_set_float(const Set *s, double d)
Return true if a set is to the left of a float.
Definition: set_ops_meos.c:371
bool right_float_span(double d, const Span *s)
Return true if a float is to the right of a span.
Definition: span_ops_meos.c:469
bool left_bigint_spanset(int64 i, const SpanSet *ss)
Return true if a big integer is to the left of a span set.
Definition: spanset_ops_meos.c:297
bool left_float_spanset(double d, const SpanSet *ss)
Return true if a float is to the left of a span set.
Definition: spanset_ops_meos.c:312
bool overleft_text_set(const text *txt, const Set *s)
Return true if a text does not extend to the right of a set.
Definition: set_ops_meos.c:668
bool right_spanset_int(const SpanSet *ss, int i)
Return true if a span set is to the right of an integer.
Definition: spanset_ops_meos.c:505
bool right_int_spanset(int i, const SpanSet *ss)
Return true if an integer is to the right of a span set.
Definition: spanset_ops_meos.c:438
bool overbefore_span_date(const Span *s, DateADT d)
Return true if a span is not after a date.
Definition: span_ops_meos.c:717
bool before_date_set(DateADT d, const Set *s)
Return true if a date is before a set.
Definition: set_ops_meos.c:308
bool overright_set_float(const Set *s, double d)
Return true if a set does not extend to the left of a float.
Definition: set_ops_meos.c:934
bool before_timestamptz_span(TimestampTz t, const Span *s)
Return true if a timestamptz is before a span.
Definition: span_ops_meos.c:344
bool overright_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2)
Return true if the first span set does not extend to the left of the second one.
Definition: spanset_ops.c:729
bool overright_span_float(const Span *s, double d)
Return true if a span does not extend to the left of a float.
Definition: span_ops_meos.c:858
bool overleft_float_span(double d, const Span *s)
Return true if a float does not extend to the right of a span.
Definition: span_ops_meos.c:625
bool overright_spanset_span(const SpanSet *ss, const Span *s)
Return true if a span set does not extend to the left of a span.
Definition: spanset_ops.c:713
bool overright_spanset_int(const SpanSet *ss, int i)
Return true if a span set does not extend to the left of an integer.
Definition: spanset_ops_meos.c:809
bool right_span_float(const Span *s, double d)
Return true if a span is to the right of a float.
Definition: span_ops_meos.c:546
bool overafter_span_date(const Span *s, DateADT d)
Return true if a span is not before a date.
Definition: span_ops_meos.c:873
bool right_set_bigint(const Set *s, int64 i)
Return true if a set is to the right of a big integer.
Definition: set_ops_meos.c:543
bool overright_float_set(double d, const Set *s)
Return true if a float does not extend to the left of a set.
Definition: set_ops_meos.c:841
bool overright_float_span(double d, const Span *s)
Return true if a float does not extend to the left of a span.
Definition: span_ops_meos.c:781
bool overleft_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2)
Return true if the first span set does not extend to the right of the second one.
Definition: spanset_ops.c:650
bool overright_int_set(int i, const Set *s)
Return true if an integer does not extend to the the left of a set.
Definition: set_ops_meos.c:811
bool overafter_set_timestamptz(const Set *s, TimestampTz t)
Return true if a set is not before a timestamptz.
Definition: set_ops_meos.c:979
bool before_span_date(const Span *s, DateADT d)
Return true if a span is before a date.
Definition: span_ops_meos.c:406
bool overleft_bigint_set(int64 i, const Set *s)
Return true if a big integer does not extend to the right of a set.
Definition: set_ops_meos.c:638
bool right_set_set(const Set *s1, const Set *s2)
Return true if the first set is to the right of the second one.
Definition: set_ops.c:374
bool overleft_spanset_span(const SpanSet *ss, const Span *s)
Return true if a span set does not extend to the right of a span.
Definition: spanset_ops.c:634
bool after_span_date(const Span *s, DateADT d)
Return true if a span is after a date.
Definition: span_ops_meos.c:561
bool left_spanset_float(const SpanSet *ss, double d)
Return true if a span set is to the left of a float.
Definition: spanset_ops_meos.c:389
bool after_timestamptz_spanset(TimestampTz t, const SpanSet *ss)
Return true if a timestamptz is after a span set.
Definition: spanset_ops_meos.c:490
bool right_spanset_bigint(const SpanSet *ss, int64 i)
Return true if a span set is to the right of a big integer.
Definition: spanset_ops_meos.c:518
bool after_timestamptz_span(TimestampTz t, const Span *s)
Return true if a timestamptz is after a span.
Definition: span_ops_meos.c:499
bool right_spanset_float(const SpanSet *ss, double d)
Return true if a span set is to the right of a float.
Definition: spanset_ops_meos.c:531
bool overright_span_spanset(const Span *s, const SpanSet *ss)
Return true if a span does not extend to the left of a span set.
Definition: spanset_ops.c:684
bool left_int_set(int i, const Set *s)
Return true if an integer is to the left of a set.
Definition: set_ops_meos.c:248
bool overleft_set_text(const Set *s, text *txt)
Return true if a set does not extend to the right of a text.
Definition: set_ops_meos.c:761
bool overleft_float_set(double d, const Set *s)
Return true if a float does not extend to the right of a set.
Definition: set_ops_meos.c:653
bool overbefore_timestamptz_span(TimestampTz t, const Span *s)
Return true if a timestamptz is not after a span.
Definition: span_ops_meos.c:655
bool overright_bigint_set(int64 i, const Set *s)
Return true if a big integer does not extend to the the left of a set.
Definition: set_ops_meos.c:826
bool right_bigint_span(int64 i, const Span *s)
Return true if a big integer is to the right of a span.
Definition: span_ops_meos.c:454
bool overbefore_date_spanset(DateADT d, const SpanSet *ss)
Return true if a date is not after a span set.
Definition: spanset_ops_meos.c:698
bool overleft_spanset_int(const SpanSet *ss, int i)
Return true if a span set does not extend to the right of an integer.
Definition: spanset_ops_meos.c:574
bool right_spanset_span(const SpanSet *ss, const Span *s)
Return true if a span set is to the right of a span.
Definition: spanset_ops.c:563
bool right_set_text(const Set *s, text *txt)
Return true if a set is to the right of a text.
Definition: set_ops_meos.c:573
bool overright_float_spanset(double d, const SpanSet *ss)
Return true if a float does not extend to the left of a span set.
Definition: spanset_ops_meos.c:762
bool before_timestamptz_set(TimestampTz t, const Set *s)
Return true if a timestamptz is before a set.
Definition: set_ops_meos.c:323
bool after_spanset_timestamptz(const SpanSet *ss, TimestampTz t)
Return true if a span set is after a timestamptz.
Definition: spanset_ops_meos.c:557
bool overbefore_spanset_date(const SpanSet *ss, DateADT d)
Return true if a span set is not after a date.
Definition: spanset_ops_meos.c:620
bool right_int_set(int i, const Set *s)
Return true if an integer is to the right of a set.
Definition: set_ops_meos.c:436
bool overafter_date_spanset(DateADT d, const SpanSet *ss)
Return true if a date is not before a span set.
Definition: spanset_ops_meos.c:777
bool right_set_int(const Set *s, int i)
Return true if a set is to the right of an integer.
Definition: set_ops_meos.c:528
bool left_spanset_bigint(const SpanSet *ss, int64 i)
Return true if a span set is to the left of a big integer.
Definition: spanset_ops_meos.c:374
bool after_timestamptz_set(TimestampTz t, const Set *s)
Return true if a timestamptz is after a set.
Definition: set_ops_meos.c:510
bool overright_set_bigint(const Set *s, int64 i)
Return true if a set does not extend to the left of a big integer.
Definition: set_ops_meos.c:919
bool right_int_span(int i, const Span *s)
Return true if an integer is to the right of a span.
Definition: span_ops_meos.c:439
bool after_set_timestamptz(const Set *s, TimestampTz t)
Return true if a set is after a timestamptz.
Definition: set_ops_meos.c:603
bool overleft_spanset_float(const SpanSet *ss, double d)
Return true if a span set does not extend to the right of a float.
Definition: spanset_ops_meos.c:605
bool left_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2)
Return true if the first span set is to the left of the second one.
Definition: spanset_ops.c:505
bool overleft_span_bigint(const Span *s, int64 i)
Return true if a span does not extend to the right of a big integer.
Definition: span_ops_meos.c:687
bool right_bigint_spanset(int64 i, const SpanSet *ss)
Return true if a big integer is to the right of a span set.
Definition: spanset_ops_meos.c:451
bool after_date_set(DateADT d, const Set *s)
Return true if a date is after a set.
Definition: set_ops_meos.c:496
bool overafter_timestamptz_spanset(TimestampTz t, const SpanSet *ss)
Return true if a timestamptz is not before a span set.
Definition: spanset_ops_meos.c:792
bool overright_set_text(const Set *s, text *txt)
Return true if a set does not extend to the left of a text.
Definition: set_ops_meos.c:949
bool overafter_date_span(DateADT d, const Span *s)
Return true if a date is not before a span.
Definition: span_ops_meos.c:796
bool left_spanset_span(const SpanSet *ss, const Span *s)
Return true if a span set is to the left a span.
Definition: spanset_ops.c:490
bool overright_set_set(const Set *s1, const Set *s2)
Return true if the first set does not extend to the left of the second one.
Definition: set_ops.c:464
bool right_bigint_set(int64 i, const Set *s)
Return true if a big integer is to the right of a set.
Definition: set_ops_meos.c:451
bool right_float_spanset(double d, const SpanSet *ss)
Return true if a float is to the right of a span set.
Definition: spanset_ops_meos.c:464
bool right_span_span(const Span *s1, const Span *s2)
Return true if the first span is to right the of the second one.
Definition: span_ops.c:386
bool overafter_timestamptz_set(TimestampTz t, const Set *s)
Return true if a timestamptz is not before a set.
Definition: set_ops_meos.c:886
bool right_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2)
Return true if the first span set is to the right of the second one.
Definition: spanset_ops.c:575
bool overleft_int_set(int i, const Set *s)
Return true if an integer does not extend to the right of a set.
Definition: set_ops_meos.c:623
bool right_span_int(const Span *s, int i)
Return true if a span is to the right of an integer.
Definition: span_ops_meos.c:516
bool overleft_bigint_span(int64 i, const Span *s)
Return true if a big integer does not extend to the right of a span.
Definition: span_ops_meos.c:610
bool overleft_int_span(int i, const Span *s)
Return true if an integer does not extend to the right of a span.
Definition: span_ops_meos.c:595
bool before_spanset_date(const SpanSet *ss, DateADT d)
Return true if a span set is before a date.
Definition: spanset_ops_meos.c:404
bool left_set_text(const Set *s, text *txt)
Return true if a set is to the left of a text.
Definition: set_ops_meos.c:386
bool overright_span_span(const Span *s1, const Span *s2)
Return true if the first span does not extend to the left of the second one.
Definition: span_ops.c:483
bool overleft_set_float(const Set *s, double d)
Return true if a set does not extend to the right of a float.
Definition: set_ops_meos.c:746
bool overleft_set_bigint(const Set *s, int64 i)
Return true if a set does not extend to the right of a big integer.
Definition: set_ops_meos.c:731
bool overleft_set_int(const Set *s, int i)
Return true if a set does not extend to the right of an integer.
Definition: set_ops_meos.c:716
bool left_span_int(const Span *s, int i)
Return true if a span is to the left of an integer.
Definition: span_ops_meos.c:361
bool before_date_spanset(DateADT d, const SpanSet *ss)
Return true if a date is before a span set.
Definition: spanset_ops_meos.c:327
bool left_set_set(const Set *s1, const Set *s2)
Return true if the first set is to the left of the second one.
Definition: set_ops.c:330
bool overright_span_int(const Span *s, int i)
Return true if a span does not extend to the left of an integer.
Definition: span_ops_meos.c:828
bool after_set_date(const Set *s, DateADT d)
Return true if a set is after a date.
Definition: set_ops_meos.c:588
bool after_spanset_date(const SpanSet *ss, DateADT d)
Return true if a span set is after a date.
Definition: spanset_ops_meos.c:544
bool overleft_set_set(const Set *s1, const Set *s2)
Return true if the first set does not extend to the right of the second one.
Definition: set_ops.c:417
bool left_span_bigint(const Span *s, int64 i)
Return true if a span is to the left of a big integer.
Definition: span_ops_meos.c:376
bool overright_int_spanset(int i, const SpanSet *ss)
Return true if an integer does not extend to the left of a span set.
Definition: spanset_ops_meos.c:732
bool before_date_span(DateADT d, const Span *s)
Return true if a date is before a span.
Definition: span_ops_meos.c:329
bool left_span_span(const Span *s1, const Span *s2)
Return true if the first span is to the left of the second one.
Definition: span_ops.c:326
bool overleft_spanset_bigint(const SpanSet *ss, int64 i)
Return true if a span set does not extend to the right of a big integer.
Definition: spanset_ops_meos.c:590
bool overright_span_bigint(const Span *s, int64 i)
Return true if a span does not extend to the left of a big integer.
Definition: span_ops_meos.c:843
bool left_span_spanset(const Span *s, const SpanSet *ss)
Return true if a span is before a span set.
Definition: spanset_ops.c:462
bool overafter_spanset_timestamptz(const SpanSet *ss, TimestampTz t)
Return true if a span set is before a timestamptz.
Definition: spanset_ops_meos.c:869
bool left_span_float(const Span *s, double d)
Return true if a span is to the left of a float.
Definition: span_ops_meos.c:391
bool overafter_spanset_date(const SpanSet *ss, DateADT d)
Return true if a span set is before a date.
Definition: spanset_ops_meos.c:854
bool overafter_span_timestamptz(const Span *s, TimestampTz t)
Return true if a span is not before a timestamptz.
Definition: span_ops_meos.c:888
bool overleft_span_span(const Span *s1, const Span *s2)
Return true if the first span does not extend to the right of the second one.
Definition: span_ops.c:434
bool overright_bigint_span(int64 i, const Span *s)
Return true if a big integer does not extend to the left of a span.
Definition: span_ops_meos.c:766
bool overright_spanset_bigint(const SpanSet *ss, int64 i)
Return true if a span set does not extend to the left of a big integer.
Definition: spanset_ops_meos.c:824
bool overright_int_span(int i, const Span *s)
Return true if an integer does not extend to the left of a span.
Definition: span_ops_meos.c:751
bool left_text_set(const text *txt, const Set *s)
Return true if a text is to the left of a set.
Definition: set_ops_meos.c:293
bool after_span_timestamptz(const Span *s, TimestampTz t)
Return true if a span is after a timestamptz.
Definition: span_ops_meos.c:576
bool overafter_timestamptz_span(TimestampTz t, const Span *s)
Return true if a timestamptz is not before a span.
Definition: span_ops_meos.c:811
bool left_set_int(const Set *s, int i)
Return true if a set is to the left of an integer.
Definition: set_ops_meos.c:341
bool overright_set_int(const Set *s, int i)
Return true if a set does not extend to the left of an integer.
Definition: set_ops_meos.c:904
bool overbefore_date_span(DateADT d, const Span *s)
Return true if a date is not after a span.
Definition: span_ops_meos.c:640
bool left_bigint_span(int64 i, const Span *s)
Return true if a big integer is to the left of a span.
Definition: span_ops_meos.c:299
bool overbefore_timestamptz_spanset(TimestampTz t, const SpanSet *ss)
Return true if a timestamptz is not after a span set.
Definition: spanset_ops_meos.c:713
bool left_set_bigint(const Set *s, int64 i)
Return true if a set is to the left of a big integer.
Definition: set_ops_meos.c:356
bool left_float_span(double d, const Span *s)
Return true if a float is to the left of a span.
Definition: span_ops_meos.c:314
bool overafter_date_set(DateADT d, const Set *s)
Return true if a date is not before a set.
Definition: set_ops_meos.c:871
bool before_spanset_timestamptz(const SpanSet *ss, TimestampTz t)
Return true if a span set is before a timestamptz.
Definition: spanset_ops_meos.c:419
bool overbefore_set_timestamptz(const Set *s, TimestampTz t)
Return true if a set is not after a timestamptz.
Definition: set_ops_meos.c:791
bool right_set_float(const Set *s, double d)
Return true if a set is to the right of a float.
Definition: set_ops_meos.c:558
bool after_date_span(DateADT d, const Span *s)
Return true if a date is after a span.
Definition: span_ops_meos.c:484
bool overbefore_spanset_timestamptz(const SpanSet *ss, TimestampTz t)
Return true if a span set is not after a timestamptz.
Definition: spanset_ops_meos.c:635
bool overleft_span_spanset(const Span *s, const SpanSet *ss)
Return true if a span does not extend to the right of a span set.
Definition: spanset_ops.c:618
bool left_float_set(double d, const Set *s)
Return true if a float is to the left of a set.
Definition: set_ops_meos.c:278
bool right_span_bigint(const Span *s, int64 i)
Return true if a span is to the right of a big integer.
Definition: span_ops_meos.c:531
bool overafter_set_date(const Set *s, DateADT d)
Return true if a set is not before a date.
Definition: set_ops_meos.c:964
bool overleft_int_spanset(int i, const SpanSet *ss)
Return true if an integer does not extend to the right of a span set.
Definition: spanset_ops_meos.c:652
bool overleft_float_spanset(double d, const SpanSet *ss)
Return true if a float does not extend to the right of a span set.
Definition: spanset_ops_meos.c:683
bool overright_text_set(const text *txt, const Set *s)
Return true if a text does not extend to the left of a set.
Definition: set_ops_meos.c:856
bool overright_bigint_spanset(int64 i, const SpanSet *ss)
Return true if a big integer does not extend to the left of a span set.
Definition: spanset_ops_meos.c:747
bool overbefore_timestamptz_set(TimestampTz t, const Set *s)
Return true if a timestamptz is not after a set @csqlfn Overleft_value_set()
Definition: set_ops_meos.c:698
bool before_set_date(const Set *s, DateADT d)
Return true if a set is before a date.
Definition: set_ops_meos.c:401
bool before_timestamptz_spanset(TimestampTz t, const SpanSet *ss)
Return true if a timestamptz is before a span set.
Definition: spanset_ops_meos.c:342
SpanSet * minus_timestamptz_span(TimestampTz t, const Span *s)
Return the difference of a timestamptz and a span.
Definition: span_ops_meos.c:1189
SpanSet * union_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2)
Return the union of two span sets.
Definition: spanset_ops.c:865
SpanSet * minus_spanset_timestamptz(const SpanSet *ss, TimestampTz t)
Return the difference of a span set and a timestamptz.
Definition: spanset_ops_meos.c:1259
SpanSet * intersection_spanset_span(const SpanSet *ss, const Span *s)
Return the intersection of a span set and a span.
Definition: spanset_ops.c:982
SpanSet * minus_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2)
Return the difference of two span sets.
Definition: spanset_ops.c:1233
SpanSet * minus_spanset_bigint(const SpanSet *ss, int64 i)
Return the difference of a span set and a big integer.
Definition: spanset_ops_meos.c:1214
SpanSet * intersection_span_spanset(const Span *s, const SpanSet *ss)
Return the intersection of a span and a span set.
Definition: spanset_ops.c:1030
Set * union_date_set(DateADT d, const Set *s)
Return the union of a date and a set.
Definition: set_ops_meos.c:1143
Set * intersection_set_date(const Set *s, DateADT d)
Return the intersection of a set and a date.
Definition: set_ops_meos.c:1233
Set * intersection_float_set(double d, const Set *s)
Return the intersection of a float and a set.
Definition: set_ops_meos.c:1291
Set * union_set_int(const Set *s, int i)
Return the union of a set and an integer.
Definition: set_ops_meos.c:998
Set * intersection_set_int(const Set *s, int i)
Return the intersection of a set and an integer.
Definition: set_ops_meos.c:1173
SpanSet * union_spanset_int(const SpanSet *ss, int i)
Return the union of a span set and an integer.
Definition: spanset_ops_meos.c:963
SpanSet * union_span_spanset(const Span *s, const SpanSet *ss)
Return the union of a span and a span set.
Definition: spanset_ops.c:853
Set * intersection_set_bigint(const Set *s, int64 i)
Return the intersection of a set and a big integer.
Definition: set_ops_meos.c:1188
Span * intersection_span_float(const Span *s, double d)
Return the intersection of a span and a float.
Definition: span_ops_meos.c:1081
Set * minus_int_set(int i, const Set *s)
Return the difference of an integer and a set.
Definition: set_ops_meos.c:1348
Set * union_set_bigint(const Set *s, int64 i)
Return the union of a set and a big integer.
Definition: set_ops_meos.c:1013
SpanSet * union_timestamptz_spanset(TimestampTz t, SpanSet *ss)
Return the union of a span set and a timestamptz.
Definition: spanset_ops_meos.c:948
SpanSet * intersection_spanset_int(const SpanSet *ss, int i)
Return the intersection of a span set and an integer.
Definition: spanset_ops_meos.c:1042
Set * minus_timestamptz_set(TimestampTz t, const Set *s)
Return the difference of a timestamptz and a set.
Definition: set_ops_meos.c:1423
SpanSet * minus_date_spanset(DateADT d, const SpanSet *ss)
Return the difference of a date and a span set.
Definition: spanset_ops_meos.c:1167
Set * minus_date_set(DateADT d, const Set *s)
Return the difference of a date and a set.
Definition: set_ops_meos.c:1408
Set * intersection_date_set(DateADT d, const Set *s)
Return the intersection of a date and a set.
Definition: set_ops_meos.c:1317
Set * minus_set_int(const Set *s, int i)
Return the difference of a set and an integer.
Definition: set_ops_meos.c:1441
Set * union_float_set(double d, const Set *s)
Return the union of a float and a set.
Definition: set_ops_meos.c:1117
Set * intersection_bigint_set(int64 i, const Set *s)
Return the intersection of a big integer and a set.
Definition: set_ops_meos.c:1278
Set * union_set_float(const Set *s, double d)
Return the union of a set and a float.
Definition: set_ops_meos.c:1028
Set * minus_set_timestamptz(const Set *s, TimestampTz t)
Return the difference of a set and a timestamptz.
Definition: set_ops_meos.c:1516
Set * union_bigint_set(int64 i, const Set *s)
Return the union of a big integer and a set.
Definition: set_ops_meos.c:1104
Set * intersection_text_set(const text *txt, const Set *s)
Return the intersection of a text and a set.
Definition: set_ops_meos.c:1304
Set * minus_float_set(double d, const Set *s)
Return the difference of a float and a set.
Definition: set_ops_meos.c:1378
SpanSet * union_spanset_float(const SpanSet *ss, double d)
Return the union of a span set and a float.
Definition: spanset_ops_meos.c:993
SpanSet * minus_timestamptz_spanset(TimestampTz t, const SpanSet *ss)
Return the difference of a timestamptz and a span set.
Definition: spanset_ops_meos.c:1182
Set * intersection_set_set(const Set *s1, const Set *s2)
Return the intersection of two sets.
Definition: set_ops.c:575
SpanSet * union_spanset_date(const SpanSet *ss, DateADT d)
Return the union of a span set and a date.
Definition: spanset_ops_meos.c:1008
SpanSet * minus_spanset_span(const SpanSet *ss, const Span *s)
Return the difference of a span set and a span.
Definition: spanset_ops.c:1201
Set * minus_set_bigint(const Set *s, int64 i)
Return the difference of a set and a big integer.
Definition: set_ops_meos.c:1456
Set * minus_text_set(const text *txt, const Set *s)
Return the difference of a text and a set.
Definition: set_ops_meos.c:1393
Set * intersection_set_text(const Set *s, const text *txt)
Return the intersection of a set and a text.
Definition: set_ops_meos.c:1218
SpanSet * minus_span_float(const Span *s, double d)
Return the difference of a span and a float.
Definition: span_ops_meos.c:1236
Set * union_timestamptz_set(TimestampTz t, const Set *s)
Return the union of a timestamptz and a set.
Definition: set_ops_meos.c:1156
Span * intersection_span_bigint(const Span *s, int64 i)
Return the intersection of a span and a big integer.
Definition: span_ops_meos.c:1066
Span * intersection_span_timestamptz(const Span *s, TimestampTz t)
Return the intersection of a span and a timestamptz.
Definition: span_ops_meos.c:1110
SpanSet * intersection_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2)
Return the intersection of two span sets.
Definition: spanset_ops.c:1042
SpanSet * minus_float_spanset(double d, const SpanSet *ss)
Return the difference of a float and a span set.
Definition: spanset_ops_meos.c:1152
Set * intersection_set_float(const Set *s, double d)
Return the intersection of a set and a float.
Definition: set_ops_meos.c:1203
SpanSet * intersection_spanset_date(const SpanSet *ss, DateADT d)
Return the intersection of a span set and a date.
Definition: spanset_ops_meos.c:1087
Set * union_set_date(const Set *s, DateADT d)
Return the union of a set and a date.
Definition: set_ops_meos.c:1058
SpanSet * union_span_timestamptz(const Span *s, TimestampTz t)
Return the union of a span and a timestamptz.
Definition: span_ops_meos.c:1019
SpanSet * minus_span_int(const Span *s, int i)
Return the difference of a span and an integer.
Definition: span_ops_meos.c:1206
SpanSet * minus_span_date(const Span *s, DateADT d)
Return the difference of a span and a date.
Definition: span_ops_meos.c:1251
SpanSet * minus_bigint_spanset(int64 i, const SpanSet *ss)
Return the difference of a big integer and a span set.
Definition: spanset_ops_meos.c:1137
Set * minus_set_text(const Set *s, const text *txt)
Return the difference of a set and a text.
Definition: set_ops_meos.c:1486
Set * minus_set_float(const Set *s, double d)
Return the difference of a set and a float.
Definition: set_ops_meos.c:1471
Set * union_int_set(int i, const Set *s)
Return the union of an integer and a set.
Definition: set_ops_meos.c:1091
SpanSet * intersection_spanset_bigint(const SpanSet *ss, int64 i)
Return the intersection of a span set and a big integer.
Definition: spanset_ops_meos.c:1057
Set * union_set_set(const Set *s1, const Set *s2)
Return the union of two sets.
Definition: set_ops.c:529
SpanSet * minus_date_span(DateADT d, const Span *s)
Return the difference of a date and a span.
Definition: span_ops_meos.c:1174
SpanSet * union_spanset_bigint(const SpanSet *ss, int64 i)
Return the union of a span set and a big integer.
Definition: spanset_ops_meos.c:978
SpanSet * minus_span_span(const Span *s1, const Span *s2)
Return the difference of two spans.
Definition: span_ops.c:832
SpanSet * minus_float_span(double d, const Span *s)
Return the difference of a float and a span.
Definition: span_ops_meos.c:1159
Set * intersection_int_set(int i, const Set *s)
Return the intersection of an integer and a set.
Definition: set_ops_meos.c:1265
SpanSet * union_span_bigint(const Span *s, int64 i)
Return the union of a span and a big integer.
Definition: span_ops_meos.c:935
SpanSet * union_span_span(const Span *s1, const Span *s2)
Return the union of two spans.
Definition: span_ops.c:567
SpanSet * union_span_int(const Span *s, int i)
Return the union of a span and an integer.
Definition: span_ops_meos.c:907
SpanSet * union_spanset_span(const SpanSet *ss, const Span *s)
Return the union of a span set and a span.
Definition: spanset_ops.c:776
SpanSet * union_int_span(int i, const Span *s)
Return the union of an integer and a span.
Definition: span_ops_meos.c:922
SpanSet * union_span_date(const Span *s, DateADT d)
Return the union of a span and a date.
Definition: span_ops_meos.c:991
SpanSet * minus_int_spanset(int i, const SpanSet *ss)
Return the difference of an integer and a span set.
Definition: spanset_ops_meos.c:1122
SpanSet * minus_span_timestamptz(const Span *s, TimestampTz t)
Return the difference of a span and a timestamptz.
Definition: span_ops_meos.c:1266
Set * union_set_text(const Set *s, const text *txt)
Return the union of a set and a text.
Definition: set_ops_meos.c:1043
SpanSet * union_bigint_spanset(int64 i, SpanSet *ss)
Return the union of a span set and a big integer.
Definition: spanset_ops_meos.c:903
Set * union_set_timestamptz(const Set *s, TimestampTz t)
Return the union of a set and a timestamptz.
Definition: set_ops_meos.c:1073
Set * minus_set_set(const Set *s1, const Set *s2)
Return the difference of two sets.
Definition: set_ops.c:635
SpanSet * union_float_spanset(double d, SpanSet *ss)
Return the union of a span set and a float.
Definition: spanset_ops_meos.c:918
Set * minus_set_date(const Set *s, DateADT d)
Return the difference of a set and a date.
Definition: set_ops_meos.c:1501
SpanSet * minus_span_spanset(const Span *s, const SpanSet *ss)
Return the difference of a span and a span set.
Definition: spanset_ops.c:1153
SpanSet * union_span_float(const Span *s, double d)
Return the union of a span and a float.
Definition: span_ops_meos.c:963
SpanSet * union_timestamptz_span(TimestampTz t, const Span *s)
Return the union of a timestamptz and a span.
Definition: span_ops_meos.c:1034
SpanSet * minus_spanset_int(const SpanSet *ss, int i)
Return the difference of a span set and an integer.
Definition: spanset_ops_meos.c:1199
Span * intersection_span_span(const Span *s1, const Span *s2)
Return the intersection of two spans.
Definition: span_ops.c:662
Span * intersection_span_int(const Span *s, int i)
Return the intersection of a span and an integer.
Definition: span_ops_meos.c:1051
SpanSet * union_date_spanset(DateADT d, SpanSet *ss)
Return the union of a span set and a date.
Definition: spanset_ops_meos.c:933
SpanSet * union_date_span(const Span *s, DateADT d)
Return the union of a date and a span.
Definition: span_ops_meos.c:1006
SpanSet * intersection_spanset_timestamptz(const SpanSet *ss, TimestampTz t)
Return the intersection of a span set and a timestamptz.
Definition: spanset_ops_meos.c:1102
SpanSet * union_bigint_span(const Span *s, int64 i)
Return the union of a big integer and a span.
Definition: span_ops_meos.c:950
SpanSet * intersection_spanset_float(const SpanSet *ss, double d)
Return the intersection of a span set and a float.
Definition: spanset_ops_meos.c:1072
Set * intersection_timestamptz_set(TimestampTz t, const Set *s)
Return the intersection of a timestamptz and a set.
Definition: set_ops_meos.c:1330
SpanSet * minus_spanset_date(const SpanSet *ss, DateADT d)
Return the difference of a span set and a date.
Definition: spanset_ops_meos.c:1244
SpanSet * minus_span_bigint(const Span *s, int64 i)
Return the difference of a span and a big integer.
Definition: span_ops_meos.c:1221
SpanSet * union_spanset_timestamptz(const SpanSet *ss, TimestampTz t)
Return the union of a span set and a timestamptz.
Definition: spanset_ops_meos.c:1023
Set * union_text_set(const text *txt, const Set *s)
Return the union of a text and a set.
Definition: set_ops_meos.c:1130
SpanSet * minus_int_span(int i, const Span *s)
Return the difference of an integer and a span.
Definition: span_ops_meos.c:1129
SpanSet * union_float_span(const Span *s, double d)
Return the union of a float and a span.
Definition: span_ops_meos.c:978
Set * minus_bigint_set(int64 i, const Set *s)
Return the difference of a big integer and a set.
Definition: set_ops_meos.c:1363
Set * intersection_set_timestamptz(const Set *s, TimestampTz t)
Return the intersection of a set and a timestamptz.
Definition: set_ops_meos.c:1247
SpanSet * minus_bigint_span(int64 i, const Span *s)
Return the difference of a big integer and a span.
Definition: span_ops_meos.c:1144
SpanSet * minus_spanset_float(const SpanSet *ss, double d)
Return the difference of a span set and a float.
Definition: spanset_ops_meos.c:1229
Span * intersection_span_date(const Span *s, DateADT d)
Return the intersection of a span and a date.
Definition: span_ops_meos.c:1096
SpanSet * union_int_spanset(int i, SpanSet *ss)
Return the union of a span set and an integer.
Definition: spanset_ops_meos.c:888
bool overlaps_set_set(const Set *s1, const Set *s2)
Return true if two sets overlap.
Definition: set_ops.c:269
bool contains_spanset_date(const SpanSet *ss, DateADT d)
Return true if a span set contains a date.
Definition: spanset_ops_meos.c:105
bool contained_timestamptz_spanset(TimestampTz t, const SpanSet *ss)
Return true if a timestamptz is contained in a span set.
Definition: spanset_ops_meos.c:184
bool contains_spanset_bigint(const SpanSet *ss, int64 i)
Return true if a span set contains a big integer.
Definition: spanset_ops_meos.c:75
bool contained_text_set(const text *txt, const Set *s)
Return true if a text is contained in a set.
Definition: set_ops_meos.c:198
bool adjacent_span_span(const Span *s1, const Span *s2)
Return true if two spans are adjacent.
Definition: span_ops.c:270
bool contained_date_set(DateADT d, const Set *s)
Return true if a date is contained in a set.
Definition: set_ops_meos.c:213
bool overlaps_spanset_span(const SpanSet *ss, const Span *s)
Return true if a span set and a span overlap.
Definition: spanset_ops.c:249
bool contained_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2)
Return true if the first span set is contained in the second one.
Definition: spanset_ops.c:232
bool contained_int_set(int i, const Set *s)
Return true if an integer is contained in a set.
Definition: set_ops_meos.c:153
bool contained_int_spanset(int i, const SpanSet *ss)
Return true if an integer is contained in a span set.
Definition: spanset_ops_meos.c:124
bool contained_int_span(int i, const Span *s)
Return true if an integer is contained in a span.
Definition: span_ops_meos.c:126
bool contained_bigint_spanset(int64 i, const SpanSet *ss)
Return true if a big integer is contained in a span set.
Definition: spanset_ops_meos.c:139
bool contains_span_int(const Span *s, int i)
Return true if a span contains an integer.
Definition: span_ops_meos.c:62
bool contained_float_span(double d, const Span *s)
Return true if a float is contained in a span.
Definition: span_ops_meos.c:156
bool adjacent_spanset_bigint(const SpanSet *ss, int64 i)
Return true if a span set and a big integer are adjacent.
Definition: spanset_ops_meos.c:218
bool contains_set_set(const Set *s1, const Set *s2)
Return true if the first set contains the second one.
Definition: set_ops.c:204
bool contained_float_spanset(double d, const SpanSet *ss)
Return true if a float is contained in a span set.
Definition: spanset_ops_meos.c:154
bool contained_bigint_set(int64 i, const Set *s)
Return true if a big integer is contained in a set.
Definition: set_ops_meos.c:168
bool contained_timestamptz_span(TimestampTz t, const Span *s)
Return true if a timestamp is contained in a span.
Definition: span_ops_meos.c:186
bool adjacent_span_float(const Span *s, double d)
Return true if a span and a float are adjacent.
Definition: span_ops_meos.c:235
bool contains_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2)
Return true if the first span set contains the second one.
Definition: spanset_ops.c:137
bool contains_span_float(const Span *s, double d)
Return true if a span contains a float.
Definition: span_ops_meos.c:92
bool adjacent_span_spanset(const Span *s, const SpanSet *ss)
Return true if a span and a span set are adjacent.
Definition: spanset_ops.c:402
bool overlaps_span_span(const Span *s1, const Span *s2)
Return true if two spans overlap.
Definition: span_ops.c:209
bool contains_span_timestamptz(const Span *s, TimestampTz t)
Return true if a span contains a timestamptz.
Definition: span_ops.c:142
bool contains_set_timestamptz(const Set *s, TimestampTz t)
Return true if a set contains a timestamptz.
Definition: set_ops_meos.c:133
bool overlaps_span_spanset(const Span *s, const SpanSet *ss)
Return true if a span and a span set overlap.
Definition: spanset_ops.c:285
bool contained_span_spanset(const Span *s, const SpanSet *ss)
Return true if a span is contained in a span set.
Definition: spanset_ops.c:207
bool contained_span_span(const Span *s1, const Span *s2)
Return true if the first span is contained in the second one.
Definition: span_ops.c:193
bool overlaps_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2)
Return true if two span sets overlap.
Definition: spanset_ops.c:297
bool contains_spanset_timestamptz(const SpanSet *ss, TimestampTz t)
Return true if a span set contains a timestamptz.
Definition: spanset_ops.c:80
bool adjacent_spanset_float(const SpanSet *ss, double d)
Return true if a span set and a float are adjacent.
Definition: spanset_ops_meos.c:233
bool contains_span_spanset(const Span *s, const SpanSet *ss)
Return true if a span contains a span set.
Definition: spanset_ops.c:122
bool adjacent_span_timestamptz(const Span *s, TimestampTz t)
Return true if a span and a timestamptz are adjacent.
Definition: span_ops_meos.c:265
bool contains_set_int(const Set *s, int i)
Return true if a set contains an integer.
Definition: set_ops_meos.c:58
bool adjacent_span_bigint(const Span *s, int64 i)
Return true if a span and a big integer are adjacent.
Definition: span_ops_meos.c:220
bool contained_bigint_span(int64 i, const Span *s)
Return true if a big integer is contained in a span.
Definition: span_ops_meos.c:141
bool adjacent_span_int(const Span *s, int i)
Return true if a span and an integer are adjacent.
Definition: span_ops_meos.c:205
bool adjacent_spanset_timestamptz(const SpanSet *ss, TimestampTz t)
Return true if a span set and a timestamptz are adjacent.
Definition: spanset_ops_meos.c:263
bool adjacent_spanset_date(const SpanSet *ss, DateADT d)
Return true if a span set and a date are adjacent.
Definition: spanset_ops_meos.c:248
bool contained_spanset_span(const SpanSet *ss, const Span *s)
Return true if a span set is contained in a span set.
Definition: spanset_ops.c:220
bool contained_date_spanset(DateADT d, const SpanSet *ss)
Return true if a date is contained in a span set.
Definition: spanset_ops_meos.c:169
bool contains_spanset_span(const SpanSet *ss, const Span *s)
Return true if a span set contains a span.
Definition: spanset_ops.c:95
bool contains_set_bigint(const Set *s, int64 i)
Return true if a set contains a big integer.
Definition: set_ops_meos.c:73
bool contained_timestamptz_set(TimestampTz t, const Set *s)
Return true if a timestamptz is contained in a set.
Definition: set_ops_meos.c:228
bool contains_spanset_float(const SpanSet *ss, double d)
Return true if a span set contains a float.
Definition: spanset_ops_meos.c:90
bool adjacent_span_date(const Span *s, DateADT d)
Return true if a span and a date are adjacent.
Definition: span_ops_meos.c:250
bool adjacent_spanset_int(const SpanSet *ss, int i)
Return true if a span set and an integer are adjacent.
Definition: spanset_ops_meos.c:203
bool contains_set_date(const Set *s, DateADT d)
Return true if a set contains a date.
Definition: set_ops_meos.c:118
bool contains_set_text(const Set *s, text *t)
Return true if a set contains a text.
Definition: set_ops_meos.c:103
bool contains_spanset_int(const SpanSet *ss, int i)
Return true if a span set contains an integer.
Definition: spanset_ops_meos.c:60
bool contains_span_bigint(const Span *s, int64 i)
Return true if a span contains a big integer.
Definition: span_ops_meos.c:77
bool contained_float_set(double d, const Set *s)
Return true if a float is contained in a set.
Definition: set_ops_meos.c:183
bool adjacent_spanset_span(const SpanSet *ss, const Span *s)
Return true if a span set and a span are adjacent.
Definition: spanset_ops.c:374
bool adjacent_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2)
Return true if two span sets are adjacent.
Definition: spanset_ops.c:414
bool contains_set_float(const Set *s, double d)
Return true if a set contains a float.
Definition: set_ops_meos.c:88
bool contains_span_span(const Span *s1, const Span *s2)
Return true if the first span contains the second one.
Definition: span_ops.c:156
bool contained_date_span(DateADT d, const Span *s)
Return true if a date is contained in a span.
Definition: span_ops_meos.c:171
bool contains_span_date(const Span *s, DateADT d)
Return true if a span contains a date.
Definition: span_ops_meos.c:107
bool contained_set_set(const Set *s1, const Set *s2)
Return true if the first set is contained in the second one.
Definition: set_ops.c:253
SpanSet * floatspanset_radians(const SpanSet *ss)
Return a float span set with the values converted to radians.
Definition: spanset.c:1170
SpanSet * floatspanset_shift_scale(const SpanSet *ss, double shift, double width, bool hasshift, bool haswidth)
Return a float span shifted and/or scaled by two values.
Definition: spanset_meos.c:329
SpanSet * floatspanset_ceil(const SpanSet *ss)
Return a float span set rounded up to the nearest integer.
Definition: spanset.c:1128
Span * tstzspan_expand(const Span *s, const Interval *interv)
Return a timestamptz span with its bounds expanded/decreased by an interval.
Definition: span.c:1043
Set * dateset_shift_scale(const Set *s, int shift, int width, bool hasshift, bool haswidth)
Return a date set shifted and/or scaled by two values.
Definition: set_meos.c:967
Set * tstzset_tprecision(const Set *s, const Interval *duration, TimestampTz torigin)
Return a timestamptz set with the precision set to a time bin.
Definition: temporal_analytics.c:90
Span * floatspan_round(const Span *s, int maxdd)
Return a float span with the precision of the bounds set to a number of decimal places.
Definition: span.c:835
Span * tstzspan_shift_scale(const Span *s, const Interval *shift, const Interval *duration)
Return a timestamptz span shifted and/or scaled by two intervals.
Definition: span.c:1351
Span * datespan_shift_scale(const Span *s, int shift, int width, bool hasshift, bool haswidth)
Return a date span shifted and/or scaled by the values.
Definition: span_meos.c:690
SpanSet * floatspanset_degrees(const SpanSet *ss, bool normalize)
Return a float span set with the values converted to degrees.
Definition: spanset.c:1148
Span * floatspan_shift_scale(const Span *s, double shift, double width, bool hasshift, bool haswidth)
Return a float span shifted and/or scaled by the values.
Definition: span_meos.c:670
Span * bigintspan_expand(const Span *s, int64 value)
Return a big integer span with its bounds expanded/decreased by a value.
Definition: span.c:1013
SpanSet * bigintspanset_shift_scale(const SpanSet *ss, int64 shift, int64 width, bool hasshift, bool haswidth)
Return a big integer span shifted and/or scaled by two values.
Definition: spanset_meos.c:309
Span * intspan_shift_scale(const Span *s, int shift, int width, bool hasshift, bool haswidth)
Return an integer span shifted and/or scaled by the values.
Definition: span_meos.c:630
Set * floatset_shift_scale(const Set *s, double shift, double width, bool hasshift, bool haswidth)
Return a float set shifted and/or scaled by two values.
Definition: set_meos.c:948
Span * floatspan_radians(const Span *s)
Return a float span with the values converted to radians.
Definition: span.c:923
Set * textset_upper(const Set *s)
Return a text set transformed to uppercase.
Definition: set.c:876
Set * bigintset_shift_scale(const Set *s, int64 shift, int64 width, bool hasshift, bool haswidth)
Return a big integer set shifted and/or scaled by two values.
Definition: set_meos.c:928
Span * floatspan_floor(const Span *s)
Return a float span rounded down to the nearest integer @csqlfn Floatspan_floor()
Definition: span.c:874
Set * floatset_radians(const Set *s)
Convert a float set with the values into radians.
Definition: set.c:834
Set * textcat_textset_text(const Set *s, const text *txt)
Return the concatenation of a text set and a text.
Definition: set_meos.c:888
SpanSet * tstzspanset_shift_scale(const SpanSet *ss, const Interval *shift, const Interval *duration)
Return a timestamptz span set shifted and/or scaled by two intervals.
Definition: spanset.c:1240
Set * set_round(const Set *s, int maxdd)
Return a set with the precision of the values set to a number of decimal places.
Definition: set.c:731
TimestampTz timestamptz_tprecision(TimestampTz t, const Interval *duration, TimestampTz torigin)
Return a timestamptz with the precision set to a time bin.
Definition: temporal_analytics.c:72
Span * bigintspan_shift_scale(const Span *s, int64 shift, int64 width, bool hasshift, bool haswidth)
Return a big integer span shifted and/or scaled by the values.
Definition: span_meos.c:650
Span * floatspan_degrees(const Span *s, bool normalize)
Return a float span with the values converted to degrees.
Definition: span.c:906
Set * floatset_degrees(const Set *s, bool normalize)
Convert a float set with the values into degrees.
Definition: set.c:817
Set * textset_initcap(const Set *s)
Return a text set transformed to initcap.
Definition: set.c:888
Span * floatspan_ceil(const Span *s)
Return a float span rounded up to the nearest integer @csqlfn Floatspan_ceil()
Definition: span.c:889
SpanSet * datespanset_shift_scale(const SpanSet *ss, int shift, int width, bool hasshift, bool haswidth)
Return a date span shifted and/or scaled by two values.
Definition: spanset_meos.c:349
Span * floatspan_expand(const Span *s, double value)
Return a float span with its bounds expanded/decreased by a value.
Definition: span.c:1026
Set * floatset_ceil(const Set *s)
Return a float set rounded up to the nearest integer @csqlfn Floatset_ceil()
Definition: set.c:804
SpanSet * intspanset_shift_scale(const SpanSet *ss, int shift, int width, bool hasshift, bool haswidth)
Return an integer span shifted and/or scaled by two values.
Definition: spanset_meos.c:289
Set * tstzset_shift_scale(const Set *s, const Interval *shift, const Interval *duration)
Return a timestamptz set shifted and/or scaled by two intervals.
Definition: set.c:979
Set * textset_lower(const Set *s)
Return a text set transformed to lowercase.
Definition: set.c:864
Set * textcat_text_textset(const text *txt, const Set *s)
Return the concatenation of a text and a text set.
Definition: set_meos.c:873
Set * intset_shift_scale(const Set *s, int shift, int width, bool hasshift, bool haswidth)
Return an integer set shifted and/or scaled by two values.
Definition: set_meos.c:908
Span * tstzspan_tprecision(const Span *s, const Interval *duration, TimestampTz torigin)
Return a timestamptz span with the precision set to a time bin.
Definition: temporal_analytics.c:112
SpanSet * floatspanset_round(const SpanSet *ss, int maxdd)
Return a float span set with the precision of the spans set to a number of decimal places.
Definition: spanset.c:1069
SpanSet * tstzspanset_tprecision(const SpanSet *ss, const Interval *duration, TimestampTz torigin)
Return a timestamptz span set with the precision set to a time bin.
Definition: temporal_analytics.c:139
Set * floatset_floor(const Set *s)
Return a float set rounded down to the nearest integer @csqlfn Floatset_floor()
Definition: set.c:793
SpanSet * floatspanset_floor(const SpanSet *ss)
Return a float span set rounded down to the nearest integer.
Definition: spanset.c:1109
TInstant ** temporal_instants(const Temporal *temp, int *count)
Return a copy of the distinct instants of a temporal value.
Definition: temporal.c:2654
double tfloat_min_value(const Temporal *temp)
Return the minimum value of a temporal float.
Definition: temporal_meos.c:568
bool * tbool_values(const Temporal *temp, int *count)
Return the array of base values of a temporal boolean.
Definition: temporal_meos.c:349
bool tbool_end_value(const Temporal *temp)
Return the end value of a temporal boolean.
Definition: temporal_meos.c:491
TSequenceSet * temporal_segm_duration(const Temporal *temp, const Interval *duration, bool atleast, bool strict)
Return the segments that have at least/at most a given duration.
Definition: temporal.c:2912
text * ttext_start_value(const Temporal *temp)
Return a copy of the start value of a temporal text.
Definition: temporal_meos.c:475
TSequence * temporal_sequence_n(const Temporal *temp, int i)
Return a copy of the n-th sequence of a temporal sequence (set)
Definition: temporal.c:2306
uint32 temporal_hash(const Temporal *temp)
Return the 32-bit hash value of a temporal value.
Definition: temporal.c:3527
TSequence ** temporal_segments(const Temporal *temp, int *count)
Return the array of segments of a temporal value.
Definition: temporal.c:2388
TSequence * temporal_end_sequence(const Temporal *temp)
Return a copy of the end sequence of a temporal sequence (set)
Definition: temporal.c:2281
text ** ttext_values(const Temporal *temp, int *count)
Return the array of copies of base values of a temporal text.
Definition: temporal_meos.c:409
TSequence * temporal_start_sequence(const Temporal *temp)
Return a copy of the start sequence of a temporal sequence (set)
Definition: temporal.c:2256
int temporal_num_sequences(const Temporal *temp)
Return the number of sequences of a temporal sequence (set)
Definition: temporal.c:2239
double tfloat_end_value(const Temporal *temp)
Return the end value of a temporal float.
Definition: temporal_meos.c:521
double tnumber_integral(const Temporal *temp)
Return the integral (area under the curve) of a temporal number.
Definition: temporal.c:3231
int tint_min_value(const Temporal *temp)
Return the minimum value of a temporal integer.
Definition: temporal_meos.c:553
bool tint_value_at_timestamptz(const Temporal *temp, TimestampTz t, bool strict, int *value)
Return the value of a temporal integer at a timestamptz.
Definition: temporal_restrict_meos.c:241
int * tint_values(const Temporal *temp, int *count)
Return the array of base values of a temporal integer.
Definition: temporal_meos.c:369
int tint_end_value(const Temporal *temp)
Return the end value of a temporal integer.
Definition: temporal_meos.c:506
bool tbool_value_n(const Temporal *temp, int n, bool *result)
Return the n-th value of a temporal boolean.
Definition: temporal_meos.c:648
TimestampTz temporal_start_timestamptz(const Temporal *temp)
Return the start timestamptz of a temporal value.
Definition: temporal.c:2698
const char * temporal_subtype(const Temporal *temp)
Return the string representation of the subtype of a temporal value.
Definition: temporal.c:1793
SpanSet * temporal_time(const Temporal *temp)
Return the time frame of a temporal value as a span set.
Definition: temporal.c:1926
TInstant * temporal_end_instant(const Temporal *temp)
Return a copy of the end instant of a temporal value.
Definition: temporal.c:2556
TSequence ** temporal_sequences(const Temporal *temp, int *count)
Return an array of copies of the sequences of a temporal sequence (set)
Definition: temporal.c:2367
TSequenceSet * temporal_stops(const Temporal *temp, double maxdist, const Interval *minduration)
Return the subsequences where a temporal value stays within a given distance for at least a given dur...
Definition: temporal.c:3187
TimestampTz temporal_end_timestamptz(const Temporal *temp)
Return the end timestamptz of a temporal value.
Definition: temporal.c:2723
bool tint_value_n(const Temporal *temp, int n, int *result)
Return the n-th value of a temporal integer.
Definition: temporal_meos.c:668
TInstant * temporal_max_instant(const Temporal *temp)
Return a copy of the instant with maximum base value of a temporal value.
Definition: temporal.c:2195
TInstant * temporal_min_instant(const Temporal *temp)
Return a copy of the instant with minimum base value of a temporal value.
Definition: temporal.c:2153
int tint_start_value(const Temporal *temp)
Return the start value of a temporal integer.
Definition: temporal_meos.c:445
double * tfloat_values(const Temporal *temp, int *count)
Return the array of base values of a temporal float.
Definition: temporal_meos.c:389
TInstant * temporal_start_instant(const Temporal *temp)
Return a copy of the start instant of a temporal value.
Definition: temporal.c:2510
bool temporal_lower_inc(const Temporal *temp)
Return true if the start instant of a temporal value is inclusive.
Definition: temporal.c:2414
TInstant * temporal_instant_n(const Temporal *temp, int n)
Return a copy of the n-th instant of a temporal value.
Definition: temporal.c:2602
bool ttext_value_n(const Temporal *temp, int n, text **result)
Return a copy of the n-th value of a temporal text.
Definition: temporal_meos.c:708
bool tbool_start_value(const Temporal *temp)
Return the start value of a temporal boolean.
Definition: temporal_meos.c:430
bool temporal_upper_inc(const Temporal *temp)
Return true if the end instant of a temporal value is inclusive.
Definition: temporal.c:2438
bool tfloat_value_at_timestamptz(const Temporal *temp, TimestampTz t, bool strict, double *value)
Return the value of a temporal integer at a timestamptz.
Definition: temporal_restrict_meos.c:263
text * ttext_min_value(const Temporal *temp)
Return a copy of the minimum value of a temporal text.
Definition: temporal_meos.c:583
Interval * temporal_duration(const Temporal *temp, bool boundspan)
Return the duration of a temporal value.
Definition: temporal.c:2209
const char * temporal_interp(const Temporal *temp)
Return the string representation of the interpolation of a temporal value.
Definition: temporal.c:1809
bool tfloat_value_n(const Temporal *temp, int n, double *result)
Return the n-th value of a temporal float.
Definition: temporal_meos.c:688
int temporal_num_timestamps(const Temporal *temp)
Return the number of distinct timestamps of a temporal value.
Definition: temporal.c:2673
int temporal_num_instants(const Temporal *temp)
Return the number of distinct instants of a temporal value.
Definition: temporal.c:2463
int tint_max_value(const Temporal *temp)
Return the maximum value of a temporal integer.
Definition: temporal_meos.c:600
bool ttext_value_at_timestamptz(const Temporal *temp, TimestampTz t, bool strict, text **value)
Return the value of a temporal integer at a timestamptz.
Definition: temporal_restrict_meos.c:285
double tnumber_twavg(const Temporal *temp)
Return the time-weighted average of a temporal number.
Definition: temporal.c:3257
double tfloat_max_value(const Temporal *temp)
Return the maximum value of a temporal float.
Definition: temporal_meos.c:615
bool temporal_timestamptz_n(const Temporal *temp, int n, TimestampTz *result)
Return in last argument the n-th distinct timestamptz of a temporal value.
Definition: temporal.c:2751
text * ttext_max_value(const Temporal *temp)
Return a copy of the maximum value of a temporal text.
Definition: temporal_meos.c:630
double tfloat_start_value(const Temporal *temp)
Return the start value of a temporal float.
Definition: temporal_meos.c:460
bool tbool_value_at_timestamptz(const Temporal *temp, TimestampTz t, bool strict, bool *value)
Return the value of a temporal boolean at a timestamptz.
Definition: temporal_restrict_meos.c:219
text * ttext_end_value(const Temporal *temp)
Return a copy of the end value of a temporal text.
Definition: temporal_meos.c:536
TimestampTz * temporal_timestamps(const Temporal *temp, int *count)
Return the array of distinct timestamps of a temporal value.
Definition: temporal.c:2791
SpanSet * tnumber_valuespans(const Temporal *temp)
Return the base values of a temporal number as a span set.
Definition: temporal.c:1900
Temporal * temporal_tagg_finalfn(SkipList *state)
Generic final function for aggregating temporal values.
Definition: temporal_aggfuncs.c:879
SkipList * tstzset_tcount_transfn(SkipList *state, const Set *s)
Transition function for temporal count aggregate of timestamp sets.
Definition: temporal_aggfuncs.c:1230
SkipList * tint_tmin_transfn(SkipList *state, const Temporal *temp)
Transition function for temporal minimum of temporal values.
Definition: temporal_aggfuncs_meos.c:117
SkipList * temporal_merge_transfn(SkipList *state, const Temporal *temp)
Transition function for the merge aggregate of temporal values.
Definition: temporal_aggfuncs_meos.c:289
SkipList * temporal_tcount_transfn(SkipList *state, const Temporal *temp)
Transition function for temporal count aggregation.
Definition: temporal_aggfuncs.c:1329
SkipList * temporal_merge_combinefn(SkipList *state1, SkipList *state2)
Combine function for the merge aggregate of temporal values.
Definition: temporal_aggfuncs_meos.c:304
SkipList * tstzspanset_tcount_transfn(SkipList *state, const SpanSet *ss)
Transition function for temporal count aggregate of timestamptz span sets.
Definition: temporal_aggfuncs.c:1293
SkipList * tbool_tor_transfn(SkipList *state, const Temporal *temp)
Transition function for temporal or of temporal booleans.
Definition: temporal_aggfuncs_meos.c:98
SkipList * tint_tsum_transfn(SkipList *state, const Temporal *temp)
Transition function for temporal sum of temporal values.
Definition: temporal_aggfuncs_meos.c:193
SkipList * tint_wsum_transfn(SkipList *state, const Temporal *temp, const Interval *interv)
Transition function for temporal sum of temporal values.
Definition: temporal_aggfuncs_meos.c:413
SkipList * tfloat_wmax_transfn(SkipList *state, const Temporal *temp, const Interval *interv)
Transition function for temporal maximum of temporal values.
Definition: temporal_aggfuncs_meos.c:391
SkipList * tnumber_wavg_transfn(SkipList *state, const Temporal *temp, const Interval *interv)
Transition function for temporal average of temporal numbers.
Definition: temporal_aggfuncs_meos.c:457
SkipList * tint_wmax_transfn(SkipList *state, const Temporal *temp, const Interval *interv)
Transition function for temporal maximum of temporal values.
Definition: temporal_aggfuncs_meos.c:369
Span * temporal_extent_transfn(Span *s, const Temporal *temp)
Transition function for temporal extent aggregate of temporal values.
Definition: temporal_aggfuncs.c:1443
SkipList * tfloat_wmin_transfn(SkipList *state, const Temporal *temp, const Interval *interv)
Transition function for temporal minimum of temporal values.
Definition: temporal_aggfuncs_meos.c:347
SkipList * tbool_tand_transfn(SkipList *state, const Temporal *temp)
Transition function for temporal and of temporal booleans.
Definition: temporal_aggfuncs_meos.c:79
Temporal * tnumber_tavg_finalfn(SkipList *state)
Final function for temporal average aggregation.
Definition: temporal_aggfuncs.c:1414
SkipList * ttext_tmax_transfn(SkipList *state, const Temporal *temp)
Transition function for temporal maximum of temporal text values.
Definition: temporal_aggfuncs_meos.c:270
SkipList * tstzspan_tcount_transfn(SkipList *state, const Span *s)
Transition function for temporal count aggregate of timestamptz spans.
Definition: temporal_aggfuncs.c:1261
SkipList * tfloat_tmin_transfn(SkipList *state, const Temporal *temp)
Transition function for temporal minimum of temporal values.
Definition: temporal_aggfuncs_meos.c:136
TBox * tnumber_extent_transfn(TBox *box, const Temporal *temp)
Transition function for temporal extent aggregate of temporal numbers.
Definition: temporal_aggfuncs.c:1469
SkipList * tint_tmax_transfn(SkipList *state, const Temporal *temp)
Transition function for temporal maximum of temporal values.
Definition: temporal_aggfuncs_meos.c:155
SkipList * tfloat_tsum_transfn(SkipList *state, const Temporal *temp)
Transition function for temporal sum of temporal values.
Definition: temporal_aggfuncs_meos.c:212
SkipList * tnumber_tavg_transfn(SkipList *state, const Temporal *temp)
Transition function for temporal average of temporal numbers.
Definition: temporal_aggfuncs_meos.c:231
SkipList * tint_wmin_transfn(SkipList *state, const Temporal *temp, const Interval *interv)
Transition function for temporal minimum of temporal values.
Definition: temporal_aggfuncs_meos.c:325
SkipList * tfloat_tmax_transfn(SkipList *state, const Temporal *temp)
Transition function for temporal maximum of temporal values.
Definition: temporal_aggfuncs_meos.c:174
SkipList * timestamptz_tcount_transfn(SkipList *state, TimestampTz t)
Transition function for temporal count aggregate of timestamps.
Definition: temporal_aggfuncs.c:1206
SkipList * tfloat_wsum_transfn(SkipList *state, const Temporal *temp, const Interval *interv)
Transition function for temporal sum of temporal values.
Definition: temporal_aggfuncs_meos.c:435
SkipList * ttext_tmin_transfn(SkipList *state, const Temporal *temp)
Transition function for temporal minimum of temporal text values.
Definition: temporal_aggfuncs_meos.c:251
Temporal * temporal_tsample(const Temporal *temp, const Interval *duration, TimestampTz origin, interpType interp)
Return a temporal value sampled according to time bins.
Definition: temporal_analytics.c:680
Temporal * temporal_tprecision(const Temporal *temp, const Interval *duration, TimestampTz origin)
Return a temporal value with the precision set to time bins.
Definition: temporal_analytics.c:432
double temporal_dyntimewarp_distance(const Temporal *temp1, const Temporal *temp2)
Return the Dynamic Time Warp distance between two temporal values.
Definition: temporal_analytics.c:873
double temporal_frechet_distance(const Temporal *temp1, const Temporal *temp2)
Return the Frechet distance between two temporal values.
Definition: temporal_analytics.c:857
double temporal_hausdorff_distance(const Temporal *temp1, const Temporal *temp2)
Return the Hausdorf distance between two temporal values.
Definition: temporal_analytics.c:1201
Match * temporal_frechet_path(const Temporal *temp1, const Temporal *temp2, int *count)
Return the Frechet distance between two temporal values.
Definition: temporal_analytics.c:1115
Match * temporal_dyntimewarp_path(const Temporal *temp1, const Temporal *temp2, int *count)
Return the Dynamic Time Warp distance between two temporal values.
Definition: temporal_analytics.c:1131
Temporal * temporal_simplify_max_dist(const Temporal *temp, double eps_dist, bool synchronized)
Return a temporal float/point simplified using a single-pass Douglas-Peucker line simplification algo...
Definition: temporal_analytics.c:1731
Temporal * temporal_simplify_dp(const Temporal *temp, double eps_dist, bool synchronized)
Return a temporal float/point simplified using the Douglas-Peucker line simplification algorithm.
Definition: temporal_analytics.c:1883
Temporal * temporal_simplify_min_tdelta(const Temporal *temp, const Interval *mint)
Return a temporal float/point sequence simplified ensuring that consecutive values are at least a cer...
Definition: temporal_analytics.c:1390
Temporal * temporal_simplify_min_dist(const Temporal *temp, double dist)
Return a temporal float/point sequence simplified ensuring that consecutive values are at least a giv...
Definition: temporal_analytics.c:1294
TBox * tfloatbox_time_tiles(const TBox *box, const Interval *duration, TimestampTz torigin, int *count)
Return the time tiles of a temporal float box.
Definition: temporal_tile_meos.c:210
TBox * tint_value_time_boxes(const Temporal *temp, int vsize, const Interval *duration, int 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_meos.c:252
Span * tint_value_bins(const Temporal *temp, int vsize, int vorigin, int *count)
Return the bins of an integer span.
Definition: span_tile_meos.c:249
TBox * tint_time_boxes(const Temporal *temp, const Interval *duration, TimestampTz torigin, int *count)
Return the temporal boxes of a temporal number split with respect to a time grid.
Definition: temporal_tile_meos.c:239
TBox * tfloatbox_value_time_tiles(const TBox *box, double vsize, const Interval *duration, double vorigin, TimestampTz torigin, int *count)
Return the tiles of a temporal float box.
Definition: temporal_tile_meos.c:141
Span * tfloat_value_bins(const Temporal *temp, double vsize, double vorigin, int *count)
Return the bins of a float span.
Definition: span_tile_meos.c:266
Temporal ** tint_value_time_split(const Temporal *temp, int size, const Interval *duration, int vorigin, TimestampTz torigin, int **value_bins, TimestampTz **time_bins, int *count)
Return the fragments of a temporal integer split according to value and time bins.
Definition: temporal_tile_meos.c:1383
TBox * tint_value_boxes(const Temporal *temp, int vsize, int vorigin, int *count)
Return the temporal boxes of a temporal number split with respect to a value grid.
Definition: temporal_tile_meos.c:227
Span * temporal_time_bins(const Temporal *temp, const Interval *duration, TimestampTz origin, int *count)
Return the time bins of a temporal value.
Definition: temporal_tile.c:537
TBox * tfloat_time_boxes(const Temporal *temp, const Interval *duration, 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_meos.c:280
Temporal ** tfloat_value_time_split(const Temporal *temp, double vsize, const Interval *duration, double vorigin, TimestampTz torigin, double **value_bins, TimestampTz **time_bins, int *count)
Return the fragments of a temporal integer split according to value and time bins.
Definition: temporal_tile_meos.c:1425
TBox * tfloat_value_boxes(const Temporal *temp, double vsize, double vorigin, int *count)
Return the temporal boxes of a temporal number split with respect to a value grid.
Definition: temporal_tile_meos.c:267
TBox * tfloatbox_value_tiles(const TBox *box, double vsize, double vorigin, int *count)
Return the value tiles of a temporal float box.
Definition: temporal_tile_meos.c:176
Temporal ** tint_value_split(const Temporal *temp, int vsize, int vorigin, int **bins, int *count)
Return the fragments of a temporal integer split according to value bins.
Definition: temporal_tile_meos.c:1313
TBox * tfloat_value_time_boxes(const Temporal *temp, double vsize, const Interval *duration, double 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_meos.c:293
TBox * tintbox_value_tiles(const TBox *box, int xsize, int xorigin, int *count)
Return the value tiles of a temporal integer box.
Definition: temporal_tile_meos.c:160
Temporal ** temporal_time_split(const Temporal *temp, const Interval *duration, TimestampTz torigin, TimestampTz **time_bins, int *count)
Return the fragments of a temporal value split according to time bins.
Definition: temporal_tile_meos.c:663
TBox * tintbox_value_time_tiles(const TBox *box, int xsize, const Interval *duration, int xorigin, TimestampTz torigin, int *count)
Return the tiles of a temporal integer box.
Definition: temporal_tile_meos.c:120
Temporal ** tfloat_value_split(const Temporal *temp, double size, double origin, double **bins, int *count)
Return the fragments of a temporal float split according to value bins.
Definition: temporal_tile_meos.c:1346
TBox * tintbox_time_tiles(const TBox *box, const Interval *duration, TimestampTz torigin, int *count)
Return the time tiles of a temporal float box.
Definition: temporal_tile_meos.c:193
bool overleft_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2)
Return true if the first temporal number does not extend to the right of the second one.
Definition: temporal_posops_meos.c:673
bool overafter_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2)
Return true if the first temporal number is not before the second one.
Definition: temporal_posops_meos.c:765
bool overafter_tstzspan_temporal(const Span *s, const Temporal *temp)
Return true if a timestamptz span is not before a temporal value.
Definition: temporal_posops_meos.c:105
bool overright_numspan_tnumber(const Span *s, const Temporal *temp)
Return true if a number span does not extend to the left of a temporal number.
Definition: temporal_posops_meos.c:295
bool after_tnumber_tbox(const Temporal *temp, const TBox *box)
Return true if a temporal number is after a temporal box.
Definition: temporal_posops_meos.c:620
bool overbefore_tstzspan_temporal(const Span *s, const Temporal *temp)
Return true if a timestamptz span is not after a temporal value.
Definition: temporal_posops_meos.c:75
bool before_temporal_tstzspan(const Temporal *temp, const Span *s)
Return true if a temporal value is before a timestamptz span.
Definition: temporal_posops_meos.c:123
bool before_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2)
Return true if the first temporal number is before the second one.
Definition: temporal_posops_meos.c:720
bool left_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2)
Return true if the first temporal number is to the left of the second one.
Definition: temporal_posops_meos.c:657
bool overleft_tnumber_numspan(const Temporal *temp, const Span *s)
Return true if a temporal number does not extend to the right of a number span.
Definition: temporal_posops_meos.c:331
bool after_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
Return true if the first temporal value is after the second one.
Definition: temporal_posops_meos.c:213
bool right_tnumber_tbox(const Temporal *temp, const TBox *box)
Return true if a temporal number is to the right of a temporal box.
Definition: temporal_posops_meos.c:553
bool right_tbox_tnumber(const TBox *box, const Temporal *temp)
Return true if a temporal box is to the right of a temporal number.
Definition: temporal_posops_meos.c:416
bool overafter_temporal_tstzspan(const Temporal *temp, const Span *s)
Return true if a temporal value is not before a timestamptz span.
Definition: temporal_posops_meos.c:168
bool overafter_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
Return true if the first temporal value is not before the second one.
Definition: temporal_posops_meos.c:227
bool before_tnumber_tbox(const Temporal *temp, const TBox *box)
Return true if a temporal number is before a temporal box.
Definition: temporal_posops_meos.c:586
bool before_tstzspan_temporal(const Span *s, const Temporal *temp)
Return true if a timestamptz span is before a temporal value.
Definition: temporal_posops_meos.c:60
bool left_tnumber_tbox(const Temporal *temp, const TBox *box)
Return true if a temporal number is to the left of a temporal box.
Definition: temporal_posops_meos.c:520
bool overbefore_temporal_tstzspan(const Temporal *temp, const Span *s)
Return true if a temporal value is not after a timestamptz span.
Definition: temporal_posops_meos.c:138
bool overbefore_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2)
Return true if the first temporal number is not after the second one.
Definition: temporal_posops_meos.c:735
bool left_tbox_tnumber(const TBox *box, const Temporal *temp)
Return true if a temporal box is to the left of a temporal number.
Definition: temporal_posops_meos.c:383
bool left_tnumber_numspan(const Temporal *temp, const Span *s)
Return true if a temporal number is to the left of a number span.
Definition: temporal_posops_meos.c:314
bool right_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2)
Return true if the first temporal number is to the right of the second one.
Definition: temporal_posops_meos.c:689
bool before_tbox_tnumber(const TBox *box, const Temporal *temp)
Return true if a temporal box is before a temporal number.
Definition: temporal_posops_meos.c:449
bool overleft_tbox_tnumber(const TBox *box, const Temporal *temp)
Return true if a temporal box does not extend to the right of a temporal number.
Definition: temporal_posops_meos.c:400
bool overright_tnumber_numspan(const Temporal *temp, const Span *s)
Return true if a temporal number does not extend to the left of a number span.
Definition: temporal_posops_meos.c:364
bool overafter_tbox_tnumber(const TBox *box, const Temporal *temp)
Return true if a temporal box is not before a temporal number.
Definition: temporal_posops_meos.c:500
bool overbefore_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
Return true if the first temporal value is not after the second one.
Definition: temporal_posops_meos.c:199
bool overright_tnumber_tbox(const Temporal *temp, const TBox *box)
Return true if a temporal number does not extend to the left of a temporal box.
Definition: temporal_posops_meos.c:570
bool overright_tbox_tnumber(const TBox *box, const Temporal *temp)
Return true if a temporal box does not extend to the left of a temporal number.
Definition: temporal_posops_meos.c:433
bool right_numspan_tnumber(const Span *s, const Temporal *temp)
Return true if a number span is to the right of a temporal number.
Definition: temporal_posops_meos.c:278
bool left_numspan_tnumber(const Span *s, const Temporal *temp)
Return true if a number span is to the left of a temporal number.
Definition: temporal_posops_meos.c:245
bool after_temporal_tstzspan(const Temporal *temp, const Span *s)
Return true if a temporal value is after a timestamptz span.
Definition: temporal_posops_meos.c:153
bool after_tstzspan_temporal(const Span *s, const Temporal *temp)
Return true if a timestamptz span is after a temporal value.
Definition: temporal_posops_meos.c:90
bool overbefore_tnumber_tbox(const Temporal *temp, const TBox *box)
Return true if a temporal number is not after a temporal box.
Definition: temporal_posops_meos.c:603
bool before_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
Return true if the first temporal value is before the second one.
Definition: temporal_posops_meos.c:185
bool after_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2)
Return true if the first temporal number is after the second one.
Definition: temporal_posops_meos.c:750
bool overleft_tnumber_tbox(const Temporal *temp, const TBox *box)
Return true if a temporal number does not extend to the right of a temporal box.
Definition: temporal_posops_meos.c:537
bool overleft_numspan_tnumber(const Span *s, const Temporal *temp)
Return true if a number span does not extend to the right of a temporal number.
Definition: temporal_posops_meos.c:262
bool overafter_tnumber_tbox(const Temporal *temp, const TBox *box)
Return true if a temporal number is not before a temporal box.
Definition: temporal_posops_meos.c:637
bool overright_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2)
Return true if the first temporal number does not extend to the left of the second one.
Definition: temporal_posops_meos.c:705
bool after_tbox_tnumber(const TBox *box, const Temporal *temp)
Return true if a temporal box is after a temporal number.
Definition: temporal_posops_meos.c:483
bool overbefore_tbox_tnumber(const TBox *box, const Temporal *temp)
Return true if a temporal box is not after a temporal number.
Definition: temporal_posops_meos.c:466
bool right_tnumber_numspan(const Temporal *temp, const Span *s)
Return true if a temporal number is to the right of a number span.
Definition: temporal_posops_meos.c:347
TBox * tnumber_split_n_tboxes(const Temporal *temp, int box_count, int *count)
Return an array of N temporal boxes obtained from the instants or segments of a temporal number,...
Definition: temporal_boxops.c:1501
Span * temporal_spans(const Temporal *temp, int *count)
Return an array of spans obtained from the instants or segments of a temporal value,...
Definition: temporal_boxops.c:701
Span * temporal_split_n_spans(const Temporal *temp, int span_count, int *count)
Return an array of N spans obtained from the instants or segments of a temporal value,...
Definition: temporal_boxops.c:932
TBox * tnumber_tboxes(const Temporal *temp, int *count)
Return an array of temporal boxes obtained from the instants or segments of a temporal number,...
Definition: temporal_boxops.c:1258
TBox * tnumber_split_each_n_tboxes(const Temporal *temp, int elem_count, int *count)
Return an array of temporal boxes obtained from the instants or segments of a temporal number,...
Definition: temporal_boxops.c:1671
Span * temporal_split_each_n_spans(const Temporal *temp, int elem_count, int *count)
Return an array of spans obtained from the instants or segments of a temporal value,...
Definition: temporal_boxops.c:1101
bool contained_tnumber_numspan(const Temporal *temp, const Span *s)
Return true if the value span of a temporal number is contained in a number span.
Definition: temporal_boxops_meos.c:417
bool adjacent_tnumber_tbox(const Temporal *temp, const TBox *box)
Return true if the bounding box of a temporal number and a temporal box are adjacent.
Definition: temporal_boxops_meos.c:707
bool same_tnumber_tbox(const Temporal *temp, const TBox *box)
Return true if the bounding box of a temporal number and a temporal box are equal in the common dimen...
Definition: temporal_boxops_meos.c:622
bool same_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2)
Return true if the bounding boxes of two temporal numbers are equal.
Definition: temporal_boxops_meos.c:637
bool contained_tbox_tnumber(const TBox *box, const Temporal *temp)
Return true if a temporal box is contained in the bounding box of a temporal number.
Definition: temporal_boxops_meos.c:434
bool contained_tnumber_tbox(const Temporal *temp, const TBox *box)
Return true if the bounding box of a temporal number is contained in a temporal box.
Definition: temporal_boxops_meos.c:451
bool overlaps_tnumber_numspan(const Temporal *temp, const Span *s)
Return true if the value span of a temporal number and the number span overlap.
Definition: temporal_boxops_meos.c:503
bool contains_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
Return true if the time span of the first temporal value contains the one of the second one.
Definition: temporal_boxops_meos.c:101
bool contained_tstzspan_temporal(const Span *s, const Temporal *temp)
Return true if a timestamptz span is contained the time span of a temporal value.
Definition: temporal_boxops_meos.c:119
bool contained_numspan_tnumber(const Span *s, const Temporal *temp)
Return true if a number span is contained in the value span of a temporal number.
Definition: temporal_boxops_meos.c:400
bool same_tbox_tnumber(const TBox *box, const Temporal *temp)
Return true if a temporal box and the bounding box of a temporal number are equal in the common dimen...
Definition: temporal_boxops_meos.c:605
bool contains_tnumber_tbox(const Temporal *temp, const TBox *box)
Return true if the bounding box of a temporal number contains a temporal box.
Definition: temporal_boxops_meos.c:365
bool contains_tstzspan_temporal(const Span *s, const Temporal *temp)
Return true if a timestamptz span contains the time span of a temporal value.
Definition: temporal_boxops_meos.c:70
bool adjacent_temporal_tstzspan(const Temporal *temp, const Span *s)
Return true if the time span of a temporal value and a timestamptz span are adjacent.
Definition: temporal_boxops_meos.c:280
bool overlaps_numspan_tnumber(const Span *s, const Temporal *temp)
Return true if a number span and the value span of a temporal number overlap.
Definition: temporal_boxops_meos.c:486
bool overlaps_tstzspan_temporal(const Span *s, const Temporal *temp)
Return true if a timestamptz span and the time span of a temporal value overlap.
Definition: temporal_boxops_meos.c:168
bool adjacent_tnumber_numspan(const Temporal *temp, const Span *s)
Return true if the value span of a temporal number and a number span are adjacent.
Definition: temporal_boxops_meos.c:673
bool overlaps_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2)
Return true if the bounding boxes of two temporal numbers overlap.
Definition: temporal_boxops_meos.c:552
bool same_numspan_tnumber(const Span *s, const Temporal *temp)
Return true if a number span and the value span of a temporal number are equal.
Definition: temporal_boxops_meos.c:571
bool contains_tbox_tnumber(const TBox *box, const Temporal *temp)
Return true if a temporal box contains the bounding box of a temporal number.
Definition: temporal_boxops_meos.c:348
bool adjacent_numspan_tnumber(const Span *s, const Temporal *temp)
Return true if a number span and the value span of a temporal number are adjacent.
Definition: temporal_boxops_meos.c:656
bool contains_temporal_tstzspan(const Temporal *temp, const Span *s)
Return true if the time span of a temporal value contains a timestamptz span.
Definition: temporal_boxops_meos.c:86
bool contained_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2)
Return true if the bounding box of the first temporal number is contained in the one of the second te...
Definition: temporal_boxops_meos.c:467
bool same_tnumber_numspan(const Temporal *temp, const Span *s)
Return true if the value span of a temporal number and a number span are equal.
Definition: temporal_boxops_meos.c:588
bool overlaps_tnumber_tbox(const Temporal *temp, const TBox *box)
Return true if the bounding box of a temporal number and a temporal box overlap.
Definition: temporal_boxops_meos.c:537
bool same_tstzspan_temporal(const Span *s, const Temporal *temp)
Return true if a timestamptz span and the time span of a temporal value are equal.
Definition: temporal_boxops_meos.c:216
bool adjacent_tbox_tnumber(const TBox *box, const Temporal *temp)
Return true if a temporal box and the bounding box of a temporal number are adjacent.
Definition: temporal_boxops_meos.c:690
bool same_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
Return true if the time spans of two temporal values are equal.
Definition: temporal_boxops_meos.c:246
bool contains_tnumber_numspan(const Temporal *temp, const Span *s)
Return true if the value span of a temporal number contains a number span.
Definition: temporal_boxops_meos.c:331
bool contained_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
Return true if the time span of the first temporal value is contained in the one of the second tempor...
Definition: temporal_boxops_meos.c:150
bool contained_temporal_tstzspan(const Temporal *temp, const Span *s)
Return true if the time span of a temporal value is contained in a timestamptz span.
Definition: temporal_boxops_meos.c:135
bool contains_numspan_tnumber(const Span *s, const Temporal *temp)
Return true if a number span contains the value span of a temporal number.
Definition: temporal_boxops_meos.c:314
bool overlaps_tbox_tnumber(const TBox *box, const Temporal *temp)
Return true if a temporal box and the bounding box of a temporal number overlap.
Definition: temporal_boxops_meos.c:520
bool overlaps_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
Return true if the time spans of two temporal values overlap.
Definition: temporal_boxops_meos.c:198
bool same_temporal_tstzspan(const Temporal *temp, const Span *s)
Return true if the time span of a temporal value and a timestamptz span are equal.
Definition: temporal_boxops_meos.c:232
bool adjacent_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2)
Return true if the bounding boxes of two temporal numbers are adjacent.
Definition: temporal_boxops_meos.c:723
bool adjacent_tstzspan_temporal(const Span *s, const Temporal *temp)
Return true if a timestamptz span and the time span of a temporal value are adjacent.
Definition: temporal_boxops_meos.c:264
bool adjacent_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
Return true if the time spans of two temporal values are adjacent.
Definition: temporal_boxops_meos.c:294
bool overlaps_temporal_tstzspan(const Temporal *temp, const Span *s)
Return true if the time span of a temporal value and a timestamptz span overlap.
Definition: temporal_boxops_meos.c:184
bool contains_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2)
Return true if the bounding box of the first temporal number contains the one of the second temporal ...
Definition: temporal_boxops_meos.c:381
Temporal * tor_bool_tbool(bool b, const Temporal *temp)
Return the boolean or of a boolean and a temporal boolean.
Definition: tbool_ops_meos.c:101
Temporal * tor_tbool_tbool(const Temporal *temp1, const Temporal *temp2)
Return the boolean or of the temporal booleans.
Definition: tbool_ops_meos.c:130
Temporal * tand_tbool_tbool(const Temporal *temp1, const Temporal *temp2)
Return the boolean and of the temporal booleans.
Definition: tbool_ops_meos.c:82
Temporal * tand_tbool_bool(const Temporal *temp, bool b)
Return the boolean and of a temporal boolean and a boolean.
Definition: tbool_ops_meos.c:68
Temporal * tor_tbool_bool(const Temporal *temp, bool b)
Return the boolean or of a temporal boolean and a boolean.
Definition: tbool_ops_meos.c:116
Temporal * tand_bool_tbool(bool b, const Temporal *temp)
Return the boolean and of a boolean and a temporal boolean.
Definition: tbool_ops_meos.c:53
SpanSet * tbool_when_true(const Temporal *temp)
Return the time when the temporal boolean has value true.
Definition: tbool_ops.c:153
Temporal * tnot_tbool(const Temporal *temp)
Return the boolean not of a temporal boolean.
Definition: tbool_ops.c:86
int always_gt_int_tint(int i, const Temporal *temp)
Return true if an integer is always less than a temporal integer.
Definition: temporal_compops_meos.c:1027
int always_eq_tint_int(const Temporal *temp, int i)
Return true if a temporal integer is always equal to an integer.
Definition: temporal_compops_meos.c:256
int always_le_tint_int(const Temporal *temp, int i)
Return true if a temporal integer is always less than or equal to an integer.
Definition: temporal_compops_meos.c:885
int ever_ne_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
Return true if two temporal values are ever different.
Definition: temporal_compops.c:498
int ever_eq_ttext_text(const Temporal *temp, const text *txt)
Return true if a temporal text is ever equal to a text.
Definition: temporal_compops_meos.c:162
int ever_eq_float_tfloat(double d, const Temporal *temp)
Return true if a float is ever equal to a temporal float.
Definition: temporal_compops_meos.c:85
int always_eq_tbool_bool(const Temporal *temp, bool b)
Return true if a temporal boolean is always equal to a boolean.
Definition: temporal_compops_meos.c:241
int ever_ne_bool_tbool(bool b, const Temporal *temp)
Return true if a boolean is ever different from a temporal boolean.
Definition: temporal_compops_meos.c:303
int ever_ge_text_ttext(const text *txt, const Temporal *temp)
Return true if a text is ever less than or equal to a text.
Definition: temporal_compops_meos.c:1152
int ever_ne_text_ttext(const text *txt, const Temporal *temp)
Return true if a text is ever different from a temporal text.
Definition: temporal_compops_meos.c:348
int always_ne_text_ttext(const text *txt, const Temporal *temp)
Return true if a text is always different from a temporal text.
Definition: temporal_compops_meos.c:472
int ever_ne_tbool_bool(const Temporal *temp, bool b)
Return true if a temporal boolean is ever different from a boolean.
Definition: temporal_compops_meos.c:365
int always_le_float_tfloat(double d, const Temporal *temp)
Return true if a float is always less than or equal to a float.
Definition: temporal_compops_meos.c:852
int ever_ge_tint_int(const Temporal *temp, int i)
Return true if a temporal integer is ever less than or equal to an integer.
Definition: temporal_compops_meos.c:1170
int always_eq_int_tint(int i, const Temporal *temp)
Return true if an integer is always equal to a temporal integer.
Definition: temporal_compops_meos.c:194
int ever_ge_tfloat_float(const Temporal *temp, double d)
Return true if a temporal float is ever less than or equal to a float.
Definition: temporal_compops_meos.c:1185
int ever_le_float_tfloat(double d, const Temporal *temp)
Return true if a float is ever less than or equal to a float.
Definition: temporal_compops_meos.c:755
int always_le_ttext_text(const Temporal *temp, const text *txt)
Return true if a temporal text is always less than or equal to a text.
Definition: temporal_compops_meos.c:916
int ever_ge_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
Return true if the first temporal value is ever greater than or equal to the second one.
Definition: temporal_compops.c:562
int always_eq_float_tfloat(double d, const Temporal *temp)
Return true if a float is always equal to a temporal float.
Definition: temporal_compops_meos.c:209
int always_ge_tint_int(const Temporal *temp, int i)
Return true if a temporal integer is always less than or equal to an integer.
Definition: temporal_compops_meos.c:1267
int always_ne_ttext_text(const Temporal *temp, const text *txt)
Return true if a temporal text is always different from a text.
Definition: temporal_compops_meos.c:534
int always_lt_text_ttext(const text *txt, const Temporal *temp)
Return true if a text is always less than a temporal text.
Definition: temporal_compops_meos.c:675
int always_eq_bool_tbool(bool b, const Temporal *temp)
Return true if a boolean is always equal to a temporal boolean.
Definition: temporal_compops_meos.c:179
int ever_eq_bool_tbool(bool b, const Temporal *temp)
Return true if a boolean is ever equal to a temporal boolean.
Definition: temporal_compops_meos.c:55
int ever_gt_tfloat_float(const Temporal *temp, double d)
Return true if a temporal float is ever less than a float.
Definition: temporal_compops_meos.c:995
int always_eq_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
Return true if two temporal values are always equal.
Definition: temporal_compops.c:579
int always_ne_tfloat_float(const Temporal *temp, double d)
Return true if a temporal float is always different from a float.
Definition: temporal_compops_meos.c:519
int ever_gt_float_tfloat(double d, const Temporal *temp)
Return true if a float is ever less than a temporal float.
Definition: temporal_compops_meos.c:948
int ever_le_text_ttext(const text *txt, const Temporal *temp)
Return true if a text is ever less than or equal to a text.
Definition: temporal_compops_meos.c:770
int always_lt_int_tint(int i, const Temporal *temp)
Return true if an integer is always less than a temporal integer.
Definition: temporal_compops_meos.c:645
int ever_gt_int_tint(int i, const Temporal *temp)
Return true if an integer is ever less than a temporal integer.
Definition: temporal_compops_meos.c:933
int always_ne_bool_tbool(bool b, const Temporal *temp)
Return true if a boolean is always different from a temporal boolean.
Definition: temporal_compops_meos.c:427
int always_gt_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
Return true if the first temporal value is always greater than the second one.
Definition: temporal_compops.c:642
int ever_le_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
Return true if the first temporal boolean is ever less than or equal to the second one.
Definition: temporal_compops.c:530
int ever_ne_float_tfloat(double d, const Temporal *temp)
Return true if a float is ever different from a temporal float.
Definition: temporal_compops_meos.c:333
int always_ge_ttext_text(const Temporal *temp, const text *txt)
Return true if a temporal text is always less than or equal to a text.
Definition: temporal_compops_meos.c:1298
int ever_lt_ttext_text(const Temporal *temp, const text *txt)
Return true if a temporal text is ever less than a text.
Definition: temporal_compops_meos.c:628
int always_le_int_tint(int i, const Temporal *temp)
Return true if an integer is always less than or equal to an integer.
Definition: temporal_compops_meos.c:836
int always_ge_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
Return true if the first temporal value is always greater than or equal to the second one.
Definition: temporal_compops.c:658
int ever_gt_ttext_text(const Temporal *temp, const text *txt)
Return true if a temporal text is ever less than a text.
Definition: temporal_compops_meos.c:1010
int ever_ne_tfloat_float(const Temporal *temp, double d)
Return true if a temporal float is ever different from a float.
Definition: temporal_compops_meos.c:395
int ever_le_tint_int(const Temporal *temp, int i)
Return true if a temporal integer is ever less than or equal to an integer.
Definition: temporal_compops_meos.c:788
int always_le_tfloat_float(const Temporal *temp, double d)
Return true if a temporal float is always less than or equal to a float.
Definition: temporal_compops_meos.c:901
int ever_ge_int_tint(int i, const Temporal *temp)
Return true if an integer is ever less than or equal to an integer.
Definition: temporal_compops_meos.c:1122
int ever_le_ttext_text(const Temporal *temp, const text *txt)
Return true if a temporal text is ever less than or equal to a text.
Definition: temporal_compops_meos.c:818
int ever_eq_tint_int(const Temporal *temp, int i)
Return true if a temporal integer is ever equal to an integer.
Definition: temporal_compops_meos.c:132
int always_ge_int_tint(int i, const Temporal *temp)
Return true if an integer is always less than or equal to an integer.
Definition: temporal_compops_meos.c:1218
int always_ge_text_ttext(const text *txt, const Temporal *temp)
Return true if a text is always less than or equal to a text.
Definition: temporal_compops_meos.c:1249
int always_ne_tint_int(const Temporal *temp, int i)
Return true if a temporal integer is always different from an integer.
Definition: temporal_compops_meos.c:504
int always_le_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
Return true if the first temporal value is always less than or equal to the second one.
Definition: temporal_compops.c:626
int always_eq_tfloat_float(const Temporal *temp, double d)
Return true if a temporal float is always equal to a float.
Definition: temporal_compops_meos.c:271
int ever_ne_tint_int(const Temporal *temp, int i)
Return true if a temporal integer is ever different from an integer.
Definition: temporal_compops_meos.c:380
int ever_eq_int_tint(int i, const Temporal *temp)
Return true if an integer is ever equal to a temporal integer.
Definition: temporal_compops_meos.c:70
int always_gt_float_tfloat(double d, const Temporal *temp)
Return true if a float is always less than a temporal float.
Definition: temporal_compops_meos.c:1042
int always_lt_tfloat_float(const Temporal *temp, double d)
Return true if a temporal float is always less than a float.
Definition: temporal_compops_meos.c:707
int always_lt_ttext_text(const Temporal *temp, const text *txt)
Return true if a temporal text is always less than a text.
Definition: temporal_compops_meos.c:722
int always_ne_int_tint(int i, const Temporal *temp)
Return true if an integer is always different from a temporal integer.
Definition: temporal_compops_meos.c:442
int ever_lt_text_ttext(const text *txt, const Temporal *temp)
Return true if a text is ever less than a temporal text.
Definition: temporal_compops_meos.c:581
int ever_lt_int_tint(int i, const Temporal *temp)
Return true if an integer is ever less than a temporal integer.
Definition: temporal_compops_meos.c:551
int always_ge_tfloat_float(const Temporal *temp, double d)
Return true if a temporal float is always less than or equal to a float.
Definition: temporal_compops_meos.c:1283
int ever_lt_tint_int(const Temporal *temp, int i)
Return true if a temporal integer is ever less than an integer.
Definition: temporal_compops_meos.c:598
int always_ne_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
Return true if two temporal values are always different.
Definition: temporal_compops.c:594
int ever_ge_ttext_text(const Temporal *temp, const text *txt)
Return true if a temporal text is ever less than or equal to a text.
Definition: temporal_compops_meos.c:1200
int ever_le_int_tint(int i, const Temporal *temp)
Return true if an integer is ever less than or equal to an integer.
Definition: temporal_compops_meos.c:740
int ever_gt_text_ttext(const text *txt, const Temporal *temp)
Return true if a text is ever less than a temporal text.
Definition: temporal_compops_meos.c:963
int ever_gt_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
Return true if the first temporal boolean is ever greater than the second one.
Definition: temporal_compops.c:546
int always_ne_float_tfloat(double d, const Temporal *temp)
Return true if a float is always different from a temporal float.
Definition: temporal_compops_meos.c:457
int always_gt_tfloat_float(const Temporal *temp, double d)
Return true if a temporal float is always less than a float.
Definition: temporal_compops_meos.c:1089
int always_lt_tint_int(const Temporal *temp, int i)
Return true if a temporal integer is always less than an integer.
Definition: temporal_compops_meos.c:692
int always_ne_tbool_bool(const Temporal *temp, bool b)
Return true if a temporal boolean is always different from a boolean.
Definition: temporal_compops_meos.c:489
int always_le_text_ttext(const text *txt, const Temporal *temp)
Return true if a text is always less than or equal to a text.
Definition: temporal_compops_meos.c:867
int ever_eq_tfloat_float(const Temporal *temp, double d)
Return true if a temporal float is ever equal to a float.
Definition: temporal_compops_meos.c:147
int always_lt_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
Return true if the first temporal value is always less than the second one.
Definition: temporal_compops.c:610
int ever_ge_float_tfloat(double d, const Temporal *temp)
Return true if a float is ever less than or equal to a float.
Definition: temporal_compops_meos.c:1137
int ever_lt_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
Return true if the first temporal boolean is ever less than the second one.
Definition: temporal_compops.c:514
int always_eq_text_ttext(const text *txt, const Temporal *temp)
Return true if a text is always equal to a temporal text.
Definition: temporal_compops_meos.c:224
int always_ge_float_tfloat(double d, const Temporal *temp)
Return true if a float is always less than or equal to a float.
Definition: temporal_compops_meos.c:1234
int always_eq_ttext_text(const Temporal *temp, const text *txt)
Return true if a temporal text is always equal to a text.
Definition: temporal_compops_meos.c:286
int ever_eq_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
Return true if two temporal values are ever equal.
Definition: temporal_compops.c:483
int always_gt_ttext_text(const Temporal *temp, const text *txt)
Return true if a temporal text is always less than a text.
Definition: temporal_compops_meos.c:1104
int always_lt_float_tfloat(double d, const Temporal *temp)
Return true if a float is always less than a temporal float.
Definition: temporal_compops_meos.c:660
int ever_le_tfloat_float(const Temporal *temp, double d)
Return true if a temporal float is ever less than or equal to a float.
Definition: temporal_compops_meos.c:803
int ever_lt_float_tfloat(double d, const Temporal *temp)
Return true if a float is ever less than a temporal float.
Definition: temporal_compops_meos.c:566
int ever_lt_tfloat_float(const Temporal *temp, double d)
Return true if a temporal float is ever less than a float.
Definition: temporal_compops_meos.c:613
int ever_eq_tbool_bool(const Temporal *temp, bool b)
Return true if a temporal boolean is ever equal to a boolean.
Definition: temporal_compops_meos.c:117
int always_gt_text_ttext(const text *txt, const Temporal *temp)
Return true if a text is always less than a temporal text.
Definition: temporal_compops_meos.c:1057
int ever_ne_int_tint(int i, const Temporal *temp)
Return true if an integer is ever different from a temporal integer.
Definition: temporal_compops_meos.c:318
int ever_ne_ttext_text(const Temporal *temp, const text *txt)
Return true if a temporal text is ever different from a text.
Definition: temporal_compops_meos.c:410
int ever_eq_text_ttext(const text *txt, const Temporal *temp)
Return true if a text is ever equal to a temporal text.
Definition: temporal_compops_meos.c:100
int always_gt_tint_int(const Temporal *temp, int i)
Return true if a temporal integer is always less than an integer.
Definition: temporal_compops_meos.c:1074
int ever_gt_tint_int(const Temporal *temp, int i)
Return true if a temporal integer is ever less than an integer.
Definition: temporal_compops_meos.c:980
Temporal * teq_tbool_bool(const Temporal *temp, bool b)
Return the temporal equality of a temporal boolean and a boolean.
Definition: temporal_compops_meos.c:1379
Temporal * tgt_float_tfloat(double d, const Temporal *temp)
Return the temporal greater than of a float and a temporal float.
Definition: temporal_compops_meos.c:1816
Temporal * tne_ttext_text(const Temporal *temp, const text *txt)
Return the temporal inequality of a temporal text and a text.
Definition: temporal_compops_meos.c:1550
Temporal * tge_text_ttext(const text *txt, const Temporal *temp)
Return the temporal greater than or equal to of a text and a temporal text.
Definition: temporal_compops_meos.c:1947
Temporal * tle_text_ttext(const text *txt, const Temporal *temp)
Return the temporal less or equal to than of a text and a temporal text.
Definition: temporal_compops_meos.c:1715
Temporal * tge_float_tfloat(double d, const Temporal *temp)
Return the temporal greater than or equal to of a float and a temporal float.
Definition: temporal_compops_meos.c:1931
Temporal * teq_bool_tbool(bool b, const Temporal *temp)
Return the temporal equality of a boolean and a temporal boolean.
Definition: temporal_compops_meos.c:1317
Temporal * tgt_tfloat_float(const Temporal *temp, double d)
Return the temporal greater than of a temporal float and a float.
Definition: temporal_compops_meos.c:1863
Temporal * tge_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
Return the temporal greater than or equal to of two temporal values.
Definition: temporal_compops_meos.c:2013
Temporal * teq_tint_int(const Temporal *temp, int i)
Return the temporal equality of a temporal integer and an integer.
Definition: temporal_compops_meos.c:1394
Temporal * tge_ttext_text(const Temporal *temp, const text *txt)
Return the temporal greater than or equal to of a temporal text and a text.
Definition: temporal_compops_meos.c:1997
Temporal * teq_ttext_text(const Temporal *temp, const text *txt)
Return the temporal equality of a temporal text and a text.
Definition: temporal_compops_meos.c:1424
Temporal * tgt_ttext_text(const Temporal *temp, const text *txt)
Return the temporal greater than of a temporal text and a text.
Definition: temporal_compops_meos.c:1878
Temporal * tgt_text_ttext(const text *txt, const Temporal *temp)
Return the temporal greater than of a text and a temporal text.
Definition: temporal_compops_meos.c:1831
Temporal * teq_int_tint(int i, const Temporal *temp)
Return the temporal equality of an integer and a temporal integer.
Definition: temporal_compops_meos.c:1332
Temporal * tne_text_ttext(const text *txt, const Temporal *temp)
Return the temporal inequality of a text and a temporal text.
Definition: temporal_compops_meos.c:1488
Temporal * tlt_float_tfloat(double d, const Temporal *temp)
Return the temporal less than of a float and a temporal float.
Definition: temporal_compops_meos.c:1584
Temporal * teq_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
Return the temporal equality of two temporal values.
Definition: temporal_compops.c:766
Temporal * teq_float_tfloat(double d, const Temporal *temp)
Return the temporal equality of a float and a temporal float.
Definition: temporal_compops_meos.c:1347
Temporal * tle_tint_int(const Temporal *temp, int i)
Return the temporal less than or equal to of a temporal integer and an integer.
Definition: temporal_compops_meos.c:1733
Temporal * teq_text_ttext(const text *txt, const Temporal *temp)
Return the temporal equality of a text and a temporal text.
Definition: temporal_compops_meos.c:1362
Temporal * tle_float_tfloat(double d, const Temporal *temp)
Return the temporal less than or equal to of a float and a temporal float.
Definition: temporal_compops_meos.c:1699
Temporal * tlt_int_tint(int i, const Temporal *temp)
Return the temporal less than of an integer and a temporal integer.
Definition: temporal_compops_meos.c:1569
Temporal * tgt_int_tint(int i, const Temporal *temp)
Return the temporal greater than of an integer and a temporal integer.
Definition: temporal_compops_meos.c:1801
Temporal * tlt_tint_int(const Temporal *temp, int i)
Return the temporal less than of a temporal integer and an integer.
Definition: temporal_compops_meos.c:1616
Temporal * tlt_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
Return the temporal less than of two temporal values.
Definition: temporal_compops_meos.c:1662
Temporal * tne_tfloat_float(const Temporal *temp, double d)
Return the temporal inequality of a temporal float and a float.
Definition: temporal_compops_meos.c:1535
Temporal * tgt_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
Return the temporal greater than of two temporal values.
Definition: temporal_compops_meos.c:1894
Temporal * tle_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
Return the temporal less than or equal to of two temporal values.
Definition: temporal_compops_meos.c:1781
Temporal * tne_tbool_bool(const Temporal *temp, bool b)
Return the temporal inequality of a temporal boolean and a boolean.
Definition: temporal_compops_meos.c:1505
Temporal * tne_int_tint(int i, const Temporal *temp)
Return the temporal inequality of an integer and a temporal integer.
Definition: temporal_compops_meos.c:1458
Temporal * tle_ttext_text(const Temporal *temp, const text *txt)
Return the temporal less than or equal to of a temporal text and a text.
Definition: temporal_compops_meos.c:1765
Temporal * tgt_tint_int(const Temporal *temp, int i)
Return the temporal greater than of a temporal integer and an integer.
Definition: temporal_compops_meos.c:1848
Temporal * tne_temporal_temporal(const Temporal *temp1, const Temporal *temp2)
Return the temporal inequality of two temporal values.
Definition: temporal_compops.c:785
Temporal * teq_tfloat_float(const Temporal *temp, double d)
Return the temporal equality of a temporal float and a float.
Definition: temporal_compops_meos.c:1409
Temporal * tne_tint_int(const Temporal *temp, int i)
Return the temporal inequality of a temporal integer and an integer.
Definition: temporal_compops_meos.c:1520
Temporal * tlt_tfloat_float(const Temporal *temp, double d)
Return the temporal less than of a temporal float and a float.
Definition: temporal_compops_meos.c:1631
Temporal * tge_int_tint(int i, const Temporal *temp)
Return the temporal greater than or equal to of an integer and a temporal integer.
Definition: temporal_compops_meos.c:1915
Temporal * tle_tfloat_float(const Temporal *temp, double d)
Return the temporal less than or equal to of a temporal float and a float.
Definition: temporal_compops_meos.c:1749
Temporal * tlt_text_ttext(const text *txt, const Temporal *temp)
Return the temporal less than of a text and a temporal text.
Definition: temporal_compops_meos.c:1599
Temporal * tlt_ttext_text(const Temporal *temp, const text *txt)
Return the temporal less than of a temporal text and a text.
Definition: temporal_compops_meos.c:1646
Temporal * tge_tint_int(const Temporal *temp, int i)
Return the temporal greater than or equal to of a temporal integer and an integer.
Definition: temporal_compops_meos.c:1965
Temporal * tne_float_tfloat(double d, const Temporal *temp)
Return the temporal inequality of a float and a temporal float.
Definition: temporal_compops_meos.c:1473
Temporal * tle_int_tint(int i, const Temporal *temp)
Return the temporal less than or equal to of an integer and a temporal integer.
Definition: temporal_compops_meos.c:1683
Temporal * tne_bool_tbool(bool b, const Temporal *temp)
Return the temporal inequality of a boolean and a temporal boolean.
Definition: temporal_compops_meos.c:1443
Temporal * tge_tfloat_float(const Temporal *temp, double d)
Return the temporal greater than or equal to of a temporal float and a float.
Definition: temporal_compops_meos.c:1981
bool temporal_lt(const Temporal *temp1, const Temporal *temp2)
Return true if the first temporal value is less than the second one.
Definition: temporal.c:3472
bool temporal_ne(const Temporal *temp1, const Temporal *temp2)
Return true if two temporal values are different.
Definition: temporal.c:3382
bool temporal_le(const Temporal *temp1, const Temporal *temp2)
Return true if the first temporal value is less than or equal to the second one.
Definition: temporal.c:3485
int temporal_cmp(const Temporal *temp1, const Temporal *temp2)
Return -1, 0, or 1 depending on whether the first temporal value is less than, equal to,...
Definition: temporal.c:3398
bool temporal_gt(const Temporal *temp1, const Temporal *temp2)
Return true if the first temporal value is greater than the second one.
Definition: temporal.c:3510
bool temporal_ge(const Temporal *temp1, const Temporal *temp2)
Return true if the first temporal value is greater than or equal to the second one.
Definition: temporal.c:3498
bool temporal_eq(const Temporal *temp1, const Temporal *temp2)
Return true if two temporal values are equal.
Definition: temporal.c:3286
TSequenceSet * tintseqset_from_base_tstzspanset(int i, const SpanSet *ss)
Return a temporal integer sequence set from an integer and a timestamptz span set.
Definition: tsequenceset_meos.c:84
TSequence * tintseq_from_base_tstzset(int i, const Set *s)
Return a temporal integer discrete sequence from an integer and a timestamptz set.
Definition: tsequence_meos.c:142
TInstant * tboolinst_make(bool b, TimestampTz t)
Return a temporal boolean instant from a boolean and a timestamptz.
Definition: tinstant_meos.c:119
TInstant * tfloatinst_make(double d, TimestampTz t)
Return a temporal float instant from a float and a timestamptz.
Definition: tinstant_meos.c:145
Temporal * tfloat_from_base_temp(double d, const Temporal *temp)
Return a temporal float from a float and the time frame of another temporal value.
Definition: temporal_meos.c:215
TSequence * tintseq_from_base_tstzspan(int i, const Span *s)
Return a temporal integer sequence from an integer and a timestamptz span.
Definition: tsequence_meos.c:204
TSequence * tboolseq_from_base_tstzspan(bool b, const Span *s)
Return a temporal boolean sequence from a boolean and a timestamptz span.
Definition: tsequence_meos.c:189
TSequenceSet * tfloatseqset_from_base_tstzspanset(double d, const SpanSet *ss, interpType interp)
Return a temporal float sequence set from a float and a timestamptz span set.
Definition: tsequenceset_meos.c:101
TSequence * ttextseq_from_base_tstzset(const text *txt, const Set *s)
Return a temporal text discrete sequence from a text and a timestamptz set.
Definition: tsequence_meos.c:172
Temporal * tint_from_base_temp(int i, const Temporal *temp)
Return a temporal integer from an integer and the time frame of another temporal value.
Definition: temporal_meos.c:200
Temporal * tbool_from_base_temp(bool b, const Temporal *temp)
Return a temporal boolean from a boolean and the time frame of another temporal value.
Definition: temporal_meos.c:185
TSequence * tboolseq_from_base_tstzset(bool b, const Set *s)
Return a temporal boolean discrete sequence from a boolean and a timestamptz set.
Definition: tsequence_meos.c:127
TSequence * tfloatseq_from_base_tstzset(double d, const Set *s)
Return a temporal float discrete sequence from a float and a timestamptz set.
Definition: tsequence_meos.c:157
TSequence * tfloatseq_from_base_tstzspan(double d, const Span *s, interpType interp)
Return a temporal float sequence from a float and a timestamptz span.
Definition: tsequence_meos.c:220
TSequence * tsequence_make(TInstant **instants, int count, bool lower_inc, bool upper_inc, interpType interp, bool normalize)
Return a temporal sequence from an array of temporal instants.
Definition: tsequence.c:1056
Temporal * ttext_from_base_temp(const text *txt, const Temporal *temp)
Return a temporal text from a text and the time frame of another temporal value.
Definition: temporal_meos.c:230
TSequenceSet * tsequenceset_make_gaps(TInstant **instants, int count, interpType interp, const Interval *maxt, double maxdist)
Return a temporal sequence set from an array of temporal instants introducing a gap when two consecut...
Definition: tsequenceset.c:531
TSequenceSet * tsequenceset_make(TSequence **sequences, int count, bool normalize)
Return a temporal sequence set from an array of temporal sequences.
Definition: tsequenceset.c:405
TSequence * ttextseq_from_base_tstzspan(const text *txt, const Span *s)
Return a temporal text sequence from a text and a timestamptz span.
Definition: tsequence_meos.c:234
Temporal * temporal_copy(const Temporal *temp)
Return a copy of a temporal value.
Definition: temporal.c:868
TSequenceSet * tboolseqset_from_base_tstzspanset(bool b, const SpanSet *ss)
Return a temporal boolean sequence set from a boolean and a timestamptz span set.
Definition: tsequenceset_meos.c:68
TSequenceSet * ttextseqset_from_base_tstzspanset(const text *txt, const SpanSet *ss)
Return a temporal text sequence set from a text and a timestamptz span set.
Definition: tsequenceset_meos.c:118
TInstant * tintinst_make(int i, TimestampTz t)
Return a temporal integer instant from an integer and a timestamptz.
Definition: tinstant_meos.c:132
TInstant * ttextinst_make(const text *txt, TimestampTz t)
Return a temporal text instant from a text and a timestamptz.
Definition: tinstant_meos.c:158
Temporal * tfloat_to_tint(const Temporal *temp)
Convert a temporal float into a temporal integer.
Definition: temporal.c:1047
TBox * tnumber_to_tbox(const Temporal *temp)
Convert a temporal number into a temporal box.
Definition: temporal.c:1160
Temporal * tint_to_tfloat(const Temporal *temp)
Convert a temporal integer into a temporal float.
Definition: temporal.c:1026
Span * temporal_to_tstzspan(const Temporal *temp)
Return the bounding period of a temporal value.
Definition: temporal.c:1099
Temporal * tbool_to_tint(const Temporal *temp)
Convert a temporal Boolean into a temporal integer.
Definition: temporal.c:1005
Span * tnumber_to_span(const Temporal *temp)
Return the value span of a temporal number.
Definition: temporal.c:1143
int nad_tboxint_tboxint(const TBox *box1, const TBox *box2)
Return the nearest approach distance between the int temporal boxes.
Definition: tnumber_distance_meos.c:170
double nad_tfloat_float(const Temporal *temp, double d)
Return the nearest approach distance between a temporal number and a number.
Definition: tnumber_distance_meos.c:119
Temporal * tdistance_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2)
Return the temporal distance between two temporal numbers.
Definition: tnumber_distance.c:145
int nad_tint_tbox(const Temporal *temp, const TBox *box)
Return the nearest approach distance between a temporal integer and a temporal box.
Definition: tnumber_distance_meos.c:136
double nad_tfloat_tfloat(const Temporal *temp1, const Temporal *temp2)
Return the nearest approach distance between two temporal floats.
Definition: tnumber_distance_meos.c:218
Temporal * tdistance_tint_int(const Temporal *temp, int i)
Return the temporal distance between a temporal integer and an integer.
Definition: tnumber_distance_meos.c:65
Temporal * tdistance_tfloat_float(const Temporal *temp, double d)
Return the temporal distance between a temporal float and a float.
Definition: tnumber_distance_meos.c:81
double nad_tfloat_tbox(const Temporal *temp, const TBox *box)
Return the nearest approach distance between a temporal float and a temporal box.
Definition: tnumber_distance_meos.c:154
int nad_tint_int(const Temporal *temp, int i)
Return the nearest approach distance between a temporal number and a number.
Definition: tnumber_distance_meos.c:102
double nad_tboxfloat_tboxfloat(const TBox *box1, const TBox *box2)
Return the nearest approach distance between the float temporal boxes.
Definition: tnumber_distance_meos.c:187
int nad_tint_tint(const Temporal *temp1, const Temporal *temp2)
Return the nearest approach distance between two temporal integers.
Definition: tnumber_distance_meos.c:203
Temporal * tfloat_from_mfjson(const char *str)
Return a temporal float from its MF-JSON representation.
Definition: type_in_meos.c:242
Temporal * temporal_from_hexwkb(const char *hexwkb)
Return a temporal value from its ASCII hex-encoded Extended Well-Known Binary (EWKB) representation.
Definition: type_in.c:2262
Temporal * ttext_from_mfjson(const char *str)
Return a temporal text from its MF-JSON representation.
Definition: type_in_meos.c:255
char * tbool_out(const Temporal *temp)
Return the Well-Known Text (WKT) representation of a temporal boolean.
Definition: temporal_meos.c:126
Temporal * ttext_in(const char *str)
Return a temporal text from its Well-Known Text (WKT) representation.
Definition: temporal_meos.c:111
Temporal * tint_from_mfjson(const char *str)
Return a temporal integer from its MF-JSON representation.
Definition: type_in_meos.c:229
Temporal * tbool_in(const char *str)
Return a temporal boolean from its Well-Known Text (WKT) representation.
Definition: temporal_meos.c:71
char * tint_out(const Temporal *temp)
Return the Well-Known Text (WKT) representation of a temporal integer.
Definition: temporal_meos.c:139
uint8_t * temporal_as_wkb(const Temporal *temp, uint8_t variant, size_t *size_out)
Return the Well-Known Binary (WKB) representation of a temporal value.
Definition: type_out.c:2511
Temporal * temporal_from_wkb(const uint8_t *wkb, size_t size)
Return a temporal value from its Well-Known Binary (WKB) representation.
Definition: type_in.c:2245
char * temporal_as_hexwkb(const Temporal *temp, uint8_t variant, size_t *size_out)
Return the ASCII hex-encoded Well-Known Binary (HexWKB) representation of a temporal value.
Definition: type_out.c:2530
char * ttext_out(const Temporal *temp)
Return the Well-Known Text (WKT) representation of a temporal text.
Definition: temporal_meos.c:166
char * temporal_as_mfjson(const Temporal *temp, bool with_bbox, int flags, int precision, const char *srs)
Return the MF-JSON representation of a temporal value.
Definition: type_out.c:781
Temporal * tfloat_in(const char *str)
Return a temporal float from its Well-Known Text (WKT) representation.
Definition: temporal_meos.c:98
Temporal * tint_in(const char *str)
Return a temporal integer from its Well-Known Text (WKT) representation.
Definition: temporal_meos.c:85
char * tfloat_out(const Temporal *temp, int maxdd)
Return the Well-Known Text (WKT) representation of a temporal float.
Definition: temporal_meos.c:153
Temporal * tbool_from_mfjson(const char *str)
Return a temporal boolean from its MF-JSON representation.
Definition: type_in_meos.c:216
Temporal * add_int_tint(int i, const Temporal *tnumber)
Return the temporal addition of an integer and a temporal integer.
Definition: tnumber_mathfuncs_meos.c:56
Temporal * sub_int_tint(int i, const Temporal *tnumber)
Return the temporal subtraction of an integer and a temporal integer.
Definition: tnumber_mathfuncs_meos.c:139
Temporal * div_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2)
Return the temporal division of the temporal numbers.
Definition: tnumber_mathfuncs_meos.c:372
Temporal * mult_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2)
Return the temporal multiplication of the temporal numbers.
Definition: tnumber_mathfuncs_meos.c:287
Temporal * mult_int_tint(int i, const Temporal *tnumber)
Return the temporal multiplication of an integer and a temporal integer.
Definition: tnumber_mathfuncs_meos.c:223
Temporal * tnumber_trend(const Temporal *temp)
Return the trend of a temporal number.
Definition: tnumber_mathfuncs.c:666
Temporal * sub_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2)
Return the temporal subtraction of the temporal numbers.
Definition: tnumber_mathfuncs_meos.c:202
Temporal * sub_tfloat_float(const Temporal *tnumber, double d)
Return the temporal subtraction of a temporal float and a float.
Definition: tnumber_mathfuncs_meos.c:187
Temporal * tfloat_ln(const Temporal *temp)
Return the natural logarithm of a double.
Definition: tnumber_mathfuncs.c:819
Temporal * div_tfloat_float(const Temporal *tnumber, double d)
Return the temporal division of a temporal float and a float.
Definition: tnumber_mathfuncs_meos.c:357
Temporal * div_int_tint(int i, const Temporal *tnumber)
Return the temporal division of an integer and a temporal integer.
Definition: tnumber_mathfuncs_meos.c:310
Temporal * tfloat_exp(const Temporal *temp)
Return the exponential of a double.
Definition: tnumber_mathfuncs.c:752
Temporal * temporal_derivative(const Temporal *temp)
Return the derivative of a temporal value.
Definition: temporal.c:3020
Temporal * tnumber_abs(const Temporal *temp)
Return the absolute value of a temporal number.
Definition: tnumber_mathfuncs.c:340
Temporal * add_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2)
Return the temporal addition of the temporal numbers.
Definition: tnumber_mathfuncs_meos.c:119
Temporal * mult_tint_int(const Temporal *tnumber, int i)
Return the temporal multiplication of a temporal integer and an integer.
Definition: tnumber_mathfuncs_meos.c:256
Temporal * add_float_tfloat(double d, const Temporal *tnumber)
Return the temporal addition of a float and a temporal float.
Definition: tnumber_mathfuncs_meos.c:72
Temporal * tnumber_angular_difference(const Temporal *temp)
Return the angular difference of a temporal number.
Definition: tnumber_mathfuncs.c:575
Temporal * tfloat_log10(const Temporal *temp)
Return the natural logarithm of a double.
Definition: tnumber_mathfuncs.c:892
Temporal * mult_float_tfloat(double d, const Temporal *tnumber)
Return the temporal multiplication of a float and a temporal float.
Definition: tnumber_mathfuncs_meos.c:239
Temporal * div_float_tfloat(double d, const Temporal *tnumber)
Return the temporal division of a float and a temporal float.
Definition: tnumber_mathfuncs_meos.c:326
Temporal * add_tint_int(const Temporal *tnumber, int i)
Return the temporal addition of a temporal integer and an integer.
Definition: tnumber_mathfuncs_meos.c:88
Temporal * tnumber_delta_value(const Temporal *temp)
Return the delta value of a temporal number.
Definition: tnumber_mathfuncs.c:446
Temporal * mult_tfloat_float(const Temporal *tnumber, double d)
Return the temporal multiplication of a temporal float and a float.
Definition: tnumber_mathfuncs_meos.c:272
Temporal * sub_tint_int(const Temporal *tnumber, int i)
Return the temporal subtraction of a temporal integer and an integer.
Definition: tnumber_mathfuncs_meos.c:171
Temporal * div_tint_int(const Temporal *tnumber, int i)
Return the temporal division of a temporal integer and an integer.
Definition: tnumber_mathfuncs_meos.c:341
Temporal * add_tfloat_float(const Temporal *tnumber, double d)
Return the temporal addition of a temporal float and a float.
Definition: tnumber_mathfuncs_meos.c:104
Temporal * sub_float_tfloat(double d, const Temporal *tnumber)
Return the temporal subtraction of a float and a temporal float.
Definition: tnumber_mathfuncs_meos.c:155
Temporal * temporal_delete_timestamptz(const Temporal *temp, TimestampTz t, bool connect)
Delete a timestamp from a temporal value.
Definition: temporal_modif.c:1509
Temporal * temporal_append_tsequence(Temporal *temp, const TSequence *seq, bool expand)
Append a sequence to a temporal value.
Definition: temporal_modif.c:2151
Temporal * temporal_insert(const Temporal *temp1, const Temporal *temp2, bool connect)
Insert the second temporal value into the first one.
Definition: temporal_modif.c:1436
Temporal * temporal_merge(const Temporal *temp1, const Temporal *temp2)
Merge two temporal values.
Definition: temporal_modif.c:526
Temporal * temporal_merge_array(Temporal **temparr, int count)
Merge an array of temporal values.
Definition: temporal_modif.c:613
Temporal * temporal_update(const Temporal *temp1, const Temporal *temp2, bool connect)
Update the first temporal value with the second one.
Definition: temporal_modif.c:1482
Temporal * temporal_delete_tstzspan(const Temporal *temp, const Span *s, bool connect)
Delete a timestamptz span from a temporal value.
Definition: temporal_modif.c:1574
Temporal * temporal_append_tinstant(Temporal *temp, const TInstant *inst, interpType interp, double maxdist, const Interval *maxt, bool expand)
Append an instant to a temporal value.
Definition: temporal_modif.c:2109
Temporal * temporal_delete_tstzset(const Temporal *temp, const Set *s, bool connect)
Delete a timestamp set from a temporal value connecting the instants before and after the given times...
Definition: temporal_modif.c:1542
Temporal * temporal_delete_tstzspanset(const Temporal *temp, const SpanSet *ss, bool connect)
Delete a timestamptz span set from a temporal value.
Definition: temporal_modif.c:1606
Temporal * tint_at_value(const Temporal *temp, int i)
Return a temporal integer restricted to an integer.
Definition: temporal_restrict_meos.c:72
Temporal * tnumber_minus_span(const Temporal *temp, const Span *span)
Return a temporal value restricted to the complement of a span of base values.
Definition: temporal_restrict_meos.c:383
Temporal * temporal_minus_tstzspan(const Temporal *temp, const Span *s)
Return a temporal value restricted to the complement of a timestamptz span.
Definition: temporal_restrict_meos.c:511
Temporal * temporal_minus_values(const Temporal *temp, const Set *set)
Return a temporal value restricted to the complement of a set of values.
Definition: temporal_restrict_meos.c:198
Temporal * tfloat_at_value(const Temporal *temp, double d)
Return a temporal float restricted to a float.
Definition: temporal_restrict_meos.c:87
Temporal * temporal_at_tstzspan(const Temporal *temp, const Span *s)
Return a temporal value restricted to a timestamptz span.
Definition: temporal_restrict_meos.c:495
Temporal * temporal_minus_tstzset(const Temporal *temp, const Set *s)
Return a temporal value restricted to the complement of a timestamptz set.
Definition: temporal_restrict_meos.c:481
Temporal * tint_minus_value(const Temporal *temp, int i)
Return a temporal integer restricted to the complement of an integer.
Definition: temporal_restrict_meos.c:134
Temporal * tbool_minus_value(const Temporal *temp, bool b)
Return a temporal boolean restricted to the complement of a boolean.
Definition: temporal_restrict_meos.c:119
Temporal * tnumber_minus_spanset(const Temporal *temp, const SpanSet *ss)
Return a temporal value restricted to the complement of an array of spans of base values.
Definition: temporal_restrict_meos.c:418
Temporal * temporal_minus_tstzspanset(const Temporal *temp, const SpanSet *ss)
Return a temporal value restricted to the complement of a timestamptz span set.
Definition: temporal_restrict_meos.c:542
Temporal * temporal_at_max(const Temporal *temp)
Return a temporal value restricted to its maximum base value.
Definition: temporal_restrict_meos.c:334
Temporal * tbool_at_value(const Temporal *temp, bool b)
Return a temporal boolean restricted to a boolean.
Definition: temporal_restrict_meos.c:57
Temporal * ttext_minus_value(const Temporal *temp, text *txt)
Return a temporal text restricted to the complement of a text.
Definition: temporal_restrict_meos.c:164
Temporal * temporal_at_values(const Temporal *temp, const Set *set)
Return a temporal value restricted to a set of values.
Definition: temporal_restrict_meos.c:181
Temporal * temporal_minus_min(const Temporal *temp)
Return a temporal value restricted to the complement of its minimum base value.
Definition: temporal_restrict_meos.c:320
Temporal * temporal_before_timestamptz(const Temporal *temp, TimestampTz t, bool strict)
Restrict a temporal value to the instants before or equal a timestamptz.
Definition: temporal_restrict.c:3759
Temporal * temporal_at_timestamptz(const Temporal *temp, TimestampTz t)
Return a temporal value restricted to a timestamptz.
Definition: temporal_restrict_meos.c:436
Temporal * tnumber_at_tbox(const Temporal *temp, const TBox *box)
Return a temporal number restricted to a temporal box.
Definition: temporal_restrict.c:580
Temporal * temporal_after_timestamptz(const Temporal *temp, TimestampTz t, bool strict)
Restrict a temporal value to the instants after or equal a timestamptz.
Definition: temporal_restrict.c:3788
Temporal * temporal_minus_timestamptz(const Temporal *temp, TimestampTz t)
Return a temporal value restricted to the complement of a timestamptz.
Definition: temporal_restrict_meos.c:451
Temporal * tfloat_minus_value(const Temporal *temp, double d)
Return a temporal float restricted to the complement of a float.
Definition: temporal_restrict_meos.c:149
Temporal * temporal_minus_max(const Temporal *temp)
Return a temporal value restricted to the complement of its maximum base value.
Definition: temporal_restrict_meos.c:349
Temporal * temporal_at_tstzspanset(const Temporal *temp, const SpanSet *ss)
Return a temporal value restricted to a timestamptz span set.
Definition: temporal_restrict_meos.c:526
Temporal * tnumber_at_spanset(const Temporal *temp, const SpanSet *ss)
Return a temporal value restricted to an array of spans of base values.
Definition: temporal_restrict_meos.c:400
Temporal * tnumber_at_span(const Temporal *temp, const Span *span)
Return a temporal value restricted to a span of base values.
Definition: temporal_restrict_meos.c:366
Temporal * ttext_at_value(const Temporal *temp, text *txt)
Return a temporal text restricted to a text.
Definition: temporal_restrict_meos.c:102
Temporal * temporal_at_tstzset(const Temporal *temp, const Set *s)
Return a temporal value restricted to a timestamptz set.
Definition: temporal_restrict_meos.c:466
Temporal * tnumber_minus_tbox(const Temporal *temp, const TBox *box)
Return a temporal number restricted to the complement of a temporal box.
Definition: temporal_restrict.c:628
Temporal * temporal_at_min(const Temporal *temp)
Return a temporal value restricted to its minimum base value.
Definition: temporal_restrict_meos.c:305
Temporal * ttext_lower(const Temporal *temp)
Return a temporal text transformed to lowercase.
Definition: ttext_funcs_meos.c:100
Temporal * textcat_text_ttext(const text *txt, const Temporal *temp)
Return the concatenation of a text and a temporal text.
Definition: ttext_funcs_meos.c:53
Temporal * ttext_upper(const Temporal *temp)
Return a temporal text transformed to uppercase.
Definition: ttext_funcs_meos.c:114
Temporal * textcat_ttext_ttext(const Temporal *temp1, const Temporal *temp2)
Return the concatenation of two temporal text values.
Definition: ttext_funcs_meos.c:84
Temporal * ttext_initcap(const Temporal *temp)
Return a temporal text transformed to initcap.
Definition: ttext_funcs_meos.c:128
Temporal * textcat_ttext_text(const Temporal *temp, const text *txt)
Return the concatenation of a temporal text and a text.
Definition: ttext_funcs_meos.c:69
Temporal * temporal_shift_time(const Temporal *temp, const Interval *shift)
Return a temporal value shifted by an interval.
Definition: temporal.c:1746
Temporal * tfloat_floor(const Temporal *temp)
Return a temporal float rounded down to the nearest temporal integer.
Definition: temporal.c:1313
Temporal * tint_shift_scale_value(const Temporal *temp, int shift, int width)
Return a temporal integer whose value dimension is shifted and scaled by two values.
Definition: temporal_meos.c:311
Temporal * tint_scale_value(const Temporal *temp, int width)
Return a temporal integer whose value dimension is scaled by a value.
Definition: temporal_meos.c:279
Temporal * temporal_shift_scale_time(const Temporal *temp, const Interval *shift, const Interval *duration)
Return a temporal value shifted and/or scaled by two intervals.
Definition: temporal.c:1712
TSequence * temporal_to_tsequence(const Temporal *temp, interpType interp)
Return a temporal value transformed to a temporal sequence.
Definition: temporal.c:1554
TSequenceSet * temporal_to_tsequenceset(const Temporal *temp, interpType interp)
Return a temporal value transformed to a temporal sequence set.
Definition: temporal.c:1614
double float_degrees(double value, bool normalize)
Return a float converted from radians to degrees.
Definition: temporal.c:1358
Temporal * tfloat_shift_scale_value(const Temporal *temp, double shift, double width)
Return a temporal number whose value dimension is shifted and scaled by two values.
Definition: temporal_meos.c:329
Temporal * temporal_set_interp(const Temporal *temp, interpType interp)
Return a temporal value transformed to an interpolation.
Definition: temporal.c:1638
Temporal * tint_shift_value(const Temporal *temp, int shift)
Return a temporal integer whose value dimension is shifted by a value @csqlfn Tnumber_shift_value()
Definition: temporal_meos.c:249
Temporal * tfloat_radians(const Temporal *temp)
Return a temporal float transformed from degrees to radians.
Definition: temporal.c:1420
Temporal * temporal_scale_time(const Temporal *temp, const Interval *duration)
Return a temporal value scaled by an interval.
Definition: temporal.c:1759
Temporal * temporal_round(const Temporal *temp, int maxdd)
Return a temporal value rounded to a given number of decimal places.
Definition: temporal.c:1214
Temporal * tfloat_degrees(const Temporal *temp, bool normalize)
Return a temporal float transformed from radians to degrees.
Definition: temporal.c:1398
Temporal * tfloat_shift_value(const Temporal *temp, double shift)
Return a temporal integer whose value dimension is shifted by a value @csqlfn Tnumber_shift_value()
Definition: temporal_meos.c:264
Temporal * tfloat_ceil(const Temporal *temp)
Return a temporal float rounded up to the nearest temporal integer.
Definition: temporal.c:1334
Temporal ** temparr_round(Temporal **temp, int count, int maxdd)
Return an array of temporal floats with the precision of the coordinates set to a number of decimal p...
Definition: temporal.c:1238
TInstant * temporal_to_tinstant(const Temporal *temp)
Return a temporal value transformed to a temporal instant.
Definition: temporal.c:1487
Temporal * tfloat_scale_value(const Temporal *temp, double width)
Return a temporal float whose value dimension is scaled by a value.
Definition: temporal_meos.c:294
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
void meos_finalize_projsrs(void)
Destroy all the malloc'ed PROJ objects stored in the PROJSRSCache.
Definition: tspatial_transform_meos.c:174
int meos_errno_restore(int err)
Set an error number.
Definition: error.c:89
char * pg_timestamp_out(Timestamp t)
Definition: postgres_types.c:1413
bool meos_set_datestyle(const char *newval, void *extra)
Set the DateStyle.
Definition: meos.c:479
TimestampTz pg_timestamptz_in(const char *str, int32 typmod)
Definition: postgres_types.c:1352
void meos_set_spatial_ref_sys_csv(const char *path)
Set the location of the SPATIAL_REF_SYS_CSV files.
Definition: tspatial_transform_meos.c:112
void meos_finalize_ways(void)
Destroy the ways cache.
Definition: ways_meos.c:151
bool meos_set_intervalstyle(const char *newval, int extra)
Set the IntervalStyle.
Definition: meos.c:538
char * meos_get_datestyle(void)
Get the DateStyle.
Definition: meos.c:494
void meos_finalize_timezone(void)
bool tbox_xmax(const TBox *box, double *result)
Return in the last argument the maximum X value of a temporal box as a double.
Definition: tbox.c:886
RTree * rtree_create_intspan()
Creates an RTree index for integer spans.
Definition: temporal_rtree.c:781
bool tbox_xmin(const TBox *box, double *result)
Return in the last argument the minimum X value of a temporal box as a double.
Definition: tbox.c:804
void meos_initialize_error_handler(error_handler_fn err_handler)
Definition: error.c:187
RTree * rtree_create_stbox()
Creates an RTree index for spatiotemporal boxes.
Definition: temporal_rtree.c:841
void meos_initialize_timezone(const char *name)
RTree * rtree_create_bigintspan()
Creates an RTree index for big integer spans.
Definition: temporal_rtree.c:791
void rtree_free(RTree *rtree)
Frees an RTree.
Definition: temporal_rtree.c:1019
tempSubtype
Enumeration that defines the temporal subtypes used in MEOS.
Definition: meos.h:160
@ ANYTEMPSUBTYPE
Any temporal subtype.
Definition: meos.h:161
@ TSEQUENCE
Temporal sequence subtype.
Definition: meos.h:163
@ TSEQUENCESET
Temporal sequence set subtype.
Definition: meos.h:164
@ TINSTANT
Temporal instant subtype.
Definition: meos.h:162
char * meos_get_intervalstyle(void)
Get the IntervalStyle.
Definition: meos.c:551
int meos_errno_set(int err)
Set an error number.
Definition: error.c:71
RTree * rtree_create_tstzspan()
Creates an RTree index for temporal boxes.
Definition: temporal_rtree.c:821
int pg_interval_cmp(const Interval *interv1, const Interval *interv2)
Definition: postgres_types.c:2210
errorCode
Definition: meos.h:325
@ MEOS_ERR_FILE_ERROR
Definition: meos.h:335
@ MEOS_ERR_WKB_OUTPUT
Definition: meos.h:347
@ MEOS_ERR_INVALID_ARG_VALUE
Definition: meos.h:339
@ MEOS_SUCCESS
Definition: meos.h:326
@ MEOS_ERR_GEOJSON_OUTPUT
Definition: meos.h:349
@ MEOS_ERR_MFJSON_OUTPUT
Definition: meos.h:343
@ MEOS_ERR_DIRECTORY_ERROR
Definition: meos.h:334
@ MEOS_ERR_TEXT_INPUT
Definition: meos.h:344
@ MEOS_ERR_AGGREGATION_ERROR
Definition: meos.h:333
@ MEOS_ERR_WKB_INPUT
Definition: meos.h:346
@ MEOS_ERR_INVALID_ARG_TYPE
Definition: meos.h:338
@ MEOS_ERR_DIVISION_BY_ZERO
Definition: meos.h:331
@ MEOS_ERR_TEXT_OUTPUT
Definition: meos.h:345
@ MEOS_ERR_INTERNAL_ERROR
Definition: meos.h:328
@ MEOS_ERR_FEATURE_NOT_SUPPORTED
Definition: meos.h:340
@ MEOS_ERR_VALUE_OUT_OF_RANGE
Definition: meos.h:330
@ MEOS_ERR_MEMORY_ALLOC_ERROR
Definition: meos.h:332
@ MEOS_ERR_INTERNAL_TYPE_ERROR
Definition: meos.h:329
@ MEOS_ERR_MFJSON_INPUT
Definition: meos.h:342
@ MEOS_ERR_GEOJSON_INPUT
Definition: meos.h:348
@ MEOS_ERR_INVALID_ARG
Definition: meos.h:337
double tfloat_avg_value(const Temporal *temp)
void meos_finalize(void)
Definition: meos.c:582
void rtree_insert_temporal(RTree *rtree, const Temporal *temp, int id)
Insert a temporal value into the RTree index.
Definition: temporal_rtree.c:953
void(* error_handler_fn)(int, int, const char *)
Definition: meos.h:379
text * text_in(const char *str)
Return a text from its string representation.
Definition: postgres_types.c:2294
char * float8_out(double d, int maxdd)
Definition: postgres_types.c:463
RTree * rtree_create_tbox()
Creates an RTree index for temporal boxes.
Definition: temporal_rtree.c:831
Timestamp pg_timestamp_in(const char *str, int32 typmod)
Definition: postgres_types.c:1331
RTree * rtree_create_floatspan()
Creates an RTree index for float spans.
Definition: temporal_rtree.c:801
interpType
Enumeration that defines the interpolation types used in MEOS.
Definition: meos.h:171
@ DISCRETE
Definition: meos.h:173
@ INTERP_NONE
Definition: meos.h:172
@ STEP
Definition: meos.h:174
@ LINEAR
Definition: meos.h:175
RTreeSearchOp
Enumeration that defines the search operations for an RTree.
Definition: meos.h:294
@ RTREE_CONTAINED_BY
Find stored boxes contained by the query.
Definition: meos.h:297
@ RTREE_OVERLAPS
Find stored boxes that overlap the query.
Definition: meos.h:295
@ RTREE_CONTAINS
Find stored boxes that contain the query.
Definition: meos.h:296
int meos_errno(void)
Read an error number.
Definition: error.c:61
int meos_errno_reset(void)
Clears an error number.
Definition: error.c:126
Span * intspan_expand(const Span *s, int32 value)
char * pg_timestamptz_out(TimestampTz t)
Definition: postgres_types.c:1430
void meos_error(int errlevel, int errcode, const char *format,...)
Function handling error messages.
Definition: error.c:201
RTree * rtree_create_datespan()
Creates an RTree index for temporal boxes.
Definition: temporal_rtree.c:811
int rtree_search_temporal(const RTree *rtree, RTreeSearchOp op, const Temporal *temp, MeosArray *result)
Search an RTree using a temporal value's bounding box, collecting matching IDs into a MeosArray.
Definition: temporal_rtree.c:978
void meos_initialize(void)
Definition: meos.c:567
Thread-local-storage qualifier macro used by MEOS to mark per-thread state.
int64 Timestamp
Definition: postgres_ext_defs.in.h:21
int64 TimestampTz
Definition: postgres_ext_defs.in.h:22
unsigned int uint32
Definition: postgres_ext_defs.in.h:16
signed short int16
Definition: postgres_ext_defs.in.h:10
uintptr_t Datum
Definition: postgres_ext_defs.in.h:7
signed int int32
Definition: postgres_ext_defs.in.h:11
int32 DateADT
Definition: postgres_ext_defs.in.h:19
unsigned char uint8
Definition: postgres_ext_defs.in.h:14
unsigned long int uint64
Definition: postgres_ext_defs.in.h:17
long int int64
Definition: postgres_ext_defs.in.h:12
Definition: postgres_ext_defs.in.h:27
int i
Definition: meos.h:259
int j
Definition: meos.h:260
Struct for storing a similarity match.
Definition: meos.h:258
size_t elem_size
Size of a single element in bytes.
Definition: meos_internal.h:691
Structure of an expandable arrays used in particular to avoid parsing twice a MEOS value input in tex...
Definition: meos_internal.h:688
char box[]
Definition: temporal_rtree.h:94
Rtree in-memory index basic structure.
Definition: temporal_rtree.h:85
double xmin
minimum x value
Definition: meos.h:146
double zmin
minimum z value
Definition: meos.h:148
double ymin
minimum y value
Definition: meos.h:147
int32_t srid
SRID.
Definition: meos.h:152
Span period
time span
Definition: meos.h:145
double xmax
maximum x value
Definition: meos.h:149
double zmax
maximum z value
Definition: meos.h:151
int16 flags
flags
Definition: meos.h:153
double ymax
maximum y value
Definition: meos.h:150
Structure to represent spatiotemporal boxes.
Definition: meos.h:144
int16 flags
Flags.
Definition: meos.h:94
uint8 basetype
Span basetype.
Definition: meos.h:93
int32 vl_len_
Varlena header (do not touch directly!)
Definition: meos.h:91
int32 maxcount
Maximum number of elements.
Definition: meos.h:96
uint8 settype
Set type.
Definition: meos.h:92
int32 count
Number of elements.
Definition: meos.h:95
int16 bboxsize
Size of the bouding box.
Definition: meos.h:97
Structure to represent sets of values.
Definition: meos.h:90
Structure to represent skiplists that keep the current state of an aggregation.
Definition: meos_internal.h:718
int32 maxcount
Maximum number of elements.
Definition: meos.h:125
Span span
Bounding span.
Definition: meos.h:126
char padding
Not used.
Definition: meos.h:123
uint8 spansettype
Span set type.
Definition: meos.h:120
int32 count
Number of elements.
Definition: meos.h:124
int32 vl_len_
Varlena header (do not touch directly!)
Definition: meos.h:119
uint8 spantype
Span type.
Definition: meos.h:121
uint8 basetype
Span basetype.
Definition: meos.h:122
Structure to represent span sets.
Definition: meos.h:118
uint8 spantype
span type
Definition: meos.h:105
uint8 basetype
span basetype
Definition: meos.h:106
Datum lower
lower bound value
Definition: meos.h:110
bool lower_inc
lower bound is inclusive (vs exclusive)
Definition: meos.h:107
Datum upper
upper bound value
Definition: meos.h:111
bool upper_inc
upper bound is inclusive (vs exclusive)
Definition: meos.h:108
Structure to represent spans (a.k.a.
Definition: meos.h:104
int16 flags
flags
Definition: meos.h:137
Span period
time span
Definition: meos.h:135
Span span
value span
Definition: meos.h:136
Structure to represent temporal boxes.
Definition: meos.h:134
int16 flags
Flags.
Definition: meos.h:199
TimestampTz t
Timestamp (8 bytes)
Definition: meos.h:200
int32 vl_len_
Varlena header (do not touch directly!)
Definition: meos.h:196
uint8 subtype
Temporal subtype.
Definition: meos.h:198
uint8 temptype
Temporal type.
Definition: meos.h:197
Datum value
Base value for types passed by value, first 8 bytes of the base value for values passed by reference.
Definition: meos.h:201
Structure to represent temporal values of instant subtype.
Definition: meos.h:195
uint8 subtype
Temporal subtype.
Definition: meos.h:237
int16 flags
Flags.
Definition: meos.h:238
int32 vl_len_
Varlena header (do not touch directly!)
Definition: meos.h:235
uint8 temptype
Temporal type.
Definition: meos.h:236
int32 totalcount
Total number of TInstant elements in all composing TSequence elements.
Definition: meos.h:240
Span period
Time span (24 bytes).
Definition: meos.h:245
int32 maxcount
Maximum number of TSequence elements.
Definition: meos.h:242
int16 bboxsize
Size of the bounding box.
Definition: meos.h:243
int32 count
Number of TSequence elements.
Definition: meos.h:239
int16 padding
Not used.
Definition: meos.h:244
Structure to represent temporal values of sequence set subtype.
Definition: meos.h:234
uint8 subtype
Temporal subtype.
Definition: meos.h:215
uint8 temptype
Temporal type.
Definition: meos.h:214
Span period
Time span (24 bytes).
Definition: meos.h:221
int32 count
Number of TInstant elements.
Definition: meos.h:217
int16 flags
Flags.
Definition: meos.h:216
int32 vl_len_
Varlena header (do not touch directly!)
Definition: meos.h:213
int32 maxcount
Maximum number of TInstant elements.
Definition: meos.h:218
int16 bboxsize
Size of the bounding box.
Definition: meos.h:219
Structure to represent temporal values of sequence subtype.
Definition: meos.h:212
uint8 temptype
Temporal type.
Definition: meos.h:185
uint8 subtype
Temporal subtype.
Definition: meos.h:186
int32 vl_len_
Varlena header (do not touch directly!)
Definition: meos.h:184
int16 flags
Flags.
Definition: meos.h:187
Structure to represent the common structure of temporal values of any temporal subtype.
Definition: meos.h:183
Definition: postgres_ext_defs.in.h:34