30#ifndef __TEMPORAL_TILE_H__
31#define __TEMPORAL_TILE_H__
meosType
Enumeration that defines the built-in and temporal types used in MobilityDB.
Definition: meos_catalog.h:53
int64 TimestampTz
Definition: pg_ext_defs.in.h:19
uintptr_t Datum
Definition: pg_ext_defs.in.h:4
long int int64
Definition: pg_ext_defs.in.h:9
Definition: pg_ext_defs.in.h:24
Datum origin
Definition: temporal_tile.h:51
Datum minvalue
Definition: temporal_tile.h:52
Temporal * temp
Definition: temporal_tile.h:49
bool done
Definition: temporal_tile.h:46
int i
Definition: temporal_tile.h:47
Datum size
Definition: temporal_tile.h:50
Datum value
Definition: temporal_tile.h:54
Datum maxvalue
Definition: temporal_tile.h:53
meosType basetype
Definition: temporal_tile.h:48
Struct for storing the state that persists across multiple calls generating the bucket list.
Definition: temporal_tile.h:45
Structure to represent spans (a.k.a.
Definition: meos.h:70
Structure to represent temporal boxes.
Definition: meos.h:97
bool done
Definition: temporal_tile.h:63
int64 tunits
Definition: temporal_tile.h:66
double value
Definition: temporal_tile.h:68
TimestampTz t
Definition: temporal_tile.h:69
int i
Definition: temporal_tile.h:64
double xsize
Definition: temporal_tile.h:65
TBox box
Definition: temporal_tile.h:67
Struct for storing the state that persists across multiple calls generating the multidimensional grid...
Definition: temporal_tile.h:62
Structure to represent the common structure of temporal values of any temporal subtype.
Definition: meos.h:136
int count
Definition: temporal_tile.h:87
int i
Number of current tile.
Definition: temporal_tile.h:81
Datum size
Definition: temporal_tile.h:82
int64 tunits
Definition: temporal_tile.h:83
Temporal ** fragments
Definition: temporal_tile.h:86
Datum * value_buckets
Definition: temporal_tile.h:84
TimestampTz * time_buckets
Definition: temporal_tile.h:85
bool done
True when all tiles have been processed.
Definition: temporal_tile.h:80
Struct for storing the state that persists across multiple calls to output the temporal fragments.
Definition: temporal_tile.h:79
Temporal ** temporal_time_split1(const Temporal *temp, TimestampTz start, TimestampTz end, int64 tunits, TimestampTz torigin, int count, TimestampTz **buckets, int *newcount)
Split a temporal value into fragments with respect to period buckets.
Definition: temporal_tile.c:874
void tbox_tile_get(double value, TimestampTz t, double xsize, int64 tunits, TBox *box)
Generate a tile from the a multidimensional grid.
Definition: temporal_tile.c:409
struct ValueTimeSplitState ValueTimeSplitState
Struct for storing the state that persists across multiple calls to output the temporal fragments.
Temporal ** temporal_value_time_split1(Temporal *temp, Datum size, Interval *duration, Datum vorigin, TimestampTz torigin, bool valuesplit, bool timesplit, Datum **value_buckets, TimestampTz **time_buckets, int *newcount)
Split a temporal value with respect to a base value and possibly a temporal grid.
Definition: temporal_tile.c:1412
TboxGridState * tbox_tile_state_make(const TBox *box, double xsize, const Interval *duration, double xorigin, TimestampTz torigin)
Create the initial state that persists across multiple calls of the function.
Definition: temporal_tile.c:436
void tbox_tile_state_next(TboxGridState *state)
Increment the current state to the next tile of the multidimensional grid.
Definition: temporal_tile.c:476
void span_bucket_state_next(SpanBucketState *state)
Increment the current state to the next bucket of the bucket list.
Definition: temporal_tile.c:123
struct SpanBucketState SpanBucketState
Struct for storing the state that persists across multiple calls generating the bucket list.
TimestampTz timestamptz_bucket1(TimestampTz timestamp, int64 tunits, TimestampTz torigin)
Return the initial timestamp of the bucket in which a timestamp falls.
Definition: temporal_tile.c:238
void span_bucket_set(Datum lower, Datum size, meosType basetype, Span *span)
Bucket and tile functions for temporal types.
Definition: temporal_tile.c:64
struct TboxGridState TboxGridState
Struct for storing the state that persists across multiple calls generating the multidimensional grid...
int64 interval_units(const Interval *interval)
Return the interval in the same representation as Postgres timestamps.
Definition: temporal_tile.c:226
Datum datum_bucket(Datum value, Datum size, Datum offset, meosType basetype)
Return the initial value of the bucket in which a number value falls.
Definition: temporal_tile.c:299
SpanBucketState * span_bucket_state_make(const Span *s, Datum size, Datum origin)
Create the initial state that persists across multiple calls of the function.
Definition: temporal_tile.c:100
Span * span_bucket_get(Datum lower, Datum size, meosType basetype)
Generate an integer or float span bucket from a bucket list.
Definition: temporal_tile.c:79