36 #ifndef __TEMPORAL_BOXOPS_H__ 37 #define __TEMPORAL_BOXOPS_H__ 40 #include <catalog/pg_type.h> 41 #include <utils/rangetypes.h> 50 extern bool temporal_bbox_eq(
const void *box1,
const void *box2, Oid basetypid);
54 const Interval *duration, Oid basetypid);
122 bool (*func)(
const TBOX *,
const TBOX *));
124 bool (*func)(
const TBOX *,
const TBOX *));
126 bool (*func)(
const TBOX *,
const TBOX *));
128 bool (*func)(
const TBOX *,
const TBOX *));
130 bool (*func)(
const TBOX *,
const TBOX *));
Datum same_bbox_tnumber_tbox(PG_FUNCTION_ARGS)
Returns true if the bounding box of the temporal number and the temporal box are equal in the common ...
Definition: temporal_boxops.c:928
Structure to represent periods.
Definition: timetypes.h:52
int temporal_bbox_cmp(const void *box1, const void *box2, Oid basetypid)
Returns -1, 0, or 1 depending on whether the first bounding box is less than, equal, or greater than the second one.
Definition: temporal_boxops.c:105
Datum overlaps_bbox_tnumber_tbox(PG_FUNCTION_ARGS)
Returns true if the bounding box of the temporal number and the temporal box overlap.
Definition: temporal_boxops.c:872
Datum overlaps_bbox_tnumber_tnumber(PG_FUNCTION_ARGS)
Returns true if the bounding boxes of the temporal numbers overlap.
Definition: temporal_boxops.c:882
Datum contains_bbox_range_tnumber(PG_FUNCTION_ARGS)
Returns true if the range contains the bounding box of the temporal number.
Definition: temporal_boxops.c:729
Datum boxop_range_tnumber(FunctionCallInfo fcinfo, bool(*func)(const TBOX *, const TBOX *))
Generic bounding box operator for a range and a temporal number.
Definition: temporal_boxops.c:602
Datum boxop_temporal_temporal(FunctionCallInfo fcinfo, bool(*func)(const Period *, const Period *))
Generic bounding box operator for two temporal values.
Definition: temporal_boxops.c:390
Datum boxop_tnumber_tbox(FunctionCallInfo fcinfo, bool(*func)(const TBOX *, const TBOX *))
Generic bounding box operator for a temporal number and a temporal box.
Definition: temporal_boxops.c:684
Structure to represent the common structure of temporal values of any temporal subtype.
Definition: temporal.h:241
Datum contains_bbox_tnumber_range(PG_FUNCTION_ARGS)
Returns true if the bounding box of the temporal number contains the range.
Definition: temporal_boxops.c:739
Datum overlaps_bbox_period_temporal(PG_FUNCTION_ARGS)
Returns true if the period and the bounding period of the temporal value overlap. ...
Definition: temporal_boxops.c:488
Datum tnumber_minus_tbox(PG_FUNCTION_ARGS)
Restricts the temporal value to the complement of the temporal box.
Definition: temporal.c:3997
Datum same_bbox_tbox_tnumber(PG_FUNCTION_ARGS)
Returns true if the temporal box and the bounding box of the temporal number are equal in the common ...
Definition: temporal_boxops.c:917
Datum contains_bbox_tnumber_tnumber(PG_FUNCTION_ARGS)
Returns true if the bounding box of the first temporal number contains the one of the second temporal...
Definition: temporal_boxops.c:771
Datum contains_bbox_tbox_tnumber(PG_FUNCTION_ARGS)
Returns true if the temporal box contains the bounding box of the temporal number.
Definition: temporal_boxops.c:750
Datum contained_bbox_range_tnumber(PG_FUNCTION_ARGS)
Returns true if the range is contained in the bounding box of the temporal number.
Definition: temporal_boxops.c:783
Temporal * tnumber_at_tbox_internal(const Temporal *temp, const TBOX *box)
Restrict the temporal number to the temporal box (internal function)
Definition: temporal.c:3881
Datum contains_bbox_tnumber_tbox(PG_FUNCTION_ARGS)
Returns true if the bounding box of the temporal number contains the temporal box.
Definition: temporal_boxops.c:760
Datum overlaps_bbox_tnumber_range(PG_FUNCTION_ARGS)
Returns true if the bounding box of the temporal number and the the range overlap.
Definition: temporal_boxops.c:850
Basic functions for temporal types of any subtype.
Datum overlaps_bbox_range_tnumber(PG_FUNCTION_ARGS)
Returns true if the range and the bounding box of the temporal number overlap.
Definition: temporal_boxops.c:839
Datum overlaps_bbox_temporal_period(PG_FUNCTION_ARGS)
Returns true if the bounding period of the temporal value and the period overlap. ...
Definition: temporal_boxops.c:500
Datum boxop_tbox_tnumber(FunctionCallInfo fcinfo, bool(*func)(const TBOX *, const TBOX *))
Generic bounding box operator for a temporal box and a temporal number.
Definition: temporal_boxops.c:664
Datum contained_bbox_tnumber_tbox(PG_FUNCTION_ARGS)
Returns true if the bounding box of the temporal number is contained in the temporal box...
Definition: temporal_boxops.c:816
Datum contains_bbox_period_temporal(PG_FUNCTION_ARGS)
Returns true if the period contains the bounding period of the temporal value.
Definition: temporal_boxops.c:413
Datum overlaps_bbox_tbox_tnumber(PG_FUNCTION_ARGS)
Returns true if the temporal box and the bounding box of the temporal number overlap.
Definition: temporal_boxops.c:861
void temporal_bbox_expand(void *box1, const void *box2, Oid basetypid)
void tinstantset_make_bbox(void *bbox, const TInstant **inst, int count)
Set the bounding box from the array of temporal instant values (dispatch function) ...
Definition: temporal_boxops.c:226
Datum contains_bbox_temporal_period(PG_FUNCTION_ARGS)
Returns true if the bounding period of the temporal value contains the period.
Definition: temporal_boxops.c:424
Structure to represent temporal boxes.
Definition: tbox.h:53
Datum same_bbox_period_temporal(PG_FUNCTION_ARGS)
Returns true if the period and the bounding period of the temporal value are equal.
Definition: temporal_boxops.c:525
Datum boxop_period_temporal(FunctionCallInfo fcinfo, bool(*func)(const Period *, const Period *))
Generic bounding box operator for a period and a temporal value.
Definition: temporal_boxops.c:352
Datum contained_bbox_tnumber_range(PG_FUNCTION_ARGS)
Returns true if the bounding box of the temporal number is contained in the range.
Definition: temporal_boxops.c:794
Datum same_bbox_temporal_temporal(PG_FUNCTION_ARGS)
Returns true if the bounding periods of the temporal values are equal.
Definition: temporal_boxops.c:548
Datum contained_bbox_temporal_period(PG_FUNCTION_ARGS)
Returns true if the bounding period of the temporal value is contained in the period.
Definition: temporal_boxops.c:462
Functions for temporal bounding boxes.
void tinstant_make_bbox(void *bbox, const TInstant *inst)
Set the bounding box from a temporal instant value.
Definition: temporal_boxops.c:155
void temporal_bbox_shift_tscale(void *box, const Interval *start, const Interval *duration, Oid basetypid)
Shift and/or scale the time span of the bounding box with the two intervals.
Definition: temporal_boxops.c:127
Datum contained_bbox_temporal_temporal(PG_FUNCTION_ARGS)
Returns true if the bounding period of the first temporal value is contained in the bounding period o...
Definition: temporal_boxops.c:474
Datum contained_bbox_period_temporal(PG_FUNCTION_ARGS)
Returns true if the period is contained the bounding period of the temporal value.
Definition: temporal_boxops.c:450
Datum contained_bbox_tnumber_tnumber(PG_FUNCTION_ARGS)
Returns true if the bounding box of the first temporal number is contained in the one of the second t...
Definition: temporal_boxops.c:827
Temporal * tnumber_minus_tbox_internal(const Temporal *temp, const TBOX *box)
Restrict the temporal number to the complement of the temporal box (internal function).
Definition: temporal.c:3940
Datum overlaps_bbox_temporal_temporal(PG_FUNCTION_ARGS)
Returns true if the bounding periods of the temporal values overlap.
Definition: temporal_boxops.c:511
Datum boxop_tnumber_range(FunctionCallInfo fcinfo, bool(*func)(const TBOX *, const TBOX *))
Generic bounding box operator for a temporal number and a range.
Definition: temporal_boxops.c:633
Datum same_bbox_temporal_period(PG_FUNCTION_ARGS)
Returns true if the bounding period of the temporal value and the period are equal.
Definition: temporal_boxops.c:537
Datum boxop_tnumber_tnumber(FunctionCallInfo fcinfo, bool(*func)(const TBOX *, const TBOX *))
Generic bounding box operator for two temporal numbers.
Definition: temporal_boxops.c:704
Datum tnumber_at_tbox(PG_FUNCTION_ARGS)
Restricts the temporal value to the temporal box.
Definition: temporal.c:3987
Datum contained_bbox_tbox_tnumber(PG_FUNCTION_ARGS)
Returns true if the temporal box is contained in the bounding box of the temporal number...
Definition: temporal_boxops.c:805
bool upper_inc(RangeType *range)
Returns true if the upper bound of the range value is inclusive.
Definition: rangetypes_ext.c:104
void tsequenceset_make_bbox(void *bbox, const TSequence **seqs, int count)
Set the bounding box from the array of temporal sequence values (dispatch function) ...
Definition: temporal_boxops.c:322
Datum same_bbox_tnumber_range(PG_FUNCTION_ARGS)
Returns true if the bounding box of the temporal number and the the range are equal on the common dim...
Definition: temporal_boxops.c:906
Datum contains_bbox_temporal_temporal(PG_FUNCTION_ARGS)
Returns true if the bounding period of the first temporal value contains the bounding period of the s...
Definition: temporal_boxops.c:436
Datum same_bbox_tnumber_tnumber(PG_FUNCTION_ARGS)
Returns true if the bounding boxes of the temporal numbers are equal in the common dimensions...
Definition: temporal_boxops.c:939
void tsequence_make_bbox(void *bbox, const TInstant **inst, int count, bool lower_inc, bool upper_inc)
Set the bounding box from the array of temporal instant values (dispatch function) ...
Definition: temporal_boxops.c:254
bool lower_inc(RangeType *range)
Returns true if the lower bound of the range value is inclusive.
Definition: rangetypes_ext.c:91
Datum same_bbox_range_tnumber(PG_FUNCTION_ARGS)
Returns true if the range and the bounding box of the temporal number are equal on the common dimensi...
Definition: temporal_boxops.c:895
Datum boxop_temporal_period(FunctionCallInfo fcinfo, bool(*func)(const Period *, const Period *))
Generic bounding box operator for a temporal value and a period.
Definition: temporal_boxops.c:371
Structure to represent temporal values of sequence subtype.
Definition: temporal.h:279
bool temporal_bbox_eq(const void *box1, const void *box2, Oid basetypid)
Returns true if the bounding boxes are equal.
Definition: temporal_boxops.c:78
Structure to represent temporal values of instant subtype.
Definition: temporal.h:253