MobilityDB 1.1
Macros | Functions
temporal_waggfuncs.c File Reference
#include <postgres.h>
#include <meos.h>
#include <meos_internal.h>
#include "general/pg_types.h"
#include "general/doublen.h"
#include "general/temporal_aggfuncs.h"
#include "general/time_aggfuncs.h"
#include "pg_general/skiplist.h"
#include "pg_general/temporal.h"
Include dependency graph for temporal_waggfuncs.c:

Macros

#define INPUT_AGG_TRANS_STATE_ARG(fcinfo, state)
 Window aggregate functions for temporal types. More...
 

Functions

static int tcontseq_extend (const TSequence *seq, const Interval *interval, bool min, TSequence **result)
 Extend the temporal sequence value by the time interval. More...
 
static int tcontseq_transform_wcount (const TSequence *seq, const Interval *interval, TSequence **result)
 Transform the temporal number sequence value by the time interval. More...
 
static int tdiscseq_extend (const TSequence *seq, const Interval *interval, TSequence **result)
 Extend the temporal discrete sequence value by the time interval. More...
 
static int tdiscseq_transform_wcount (const TSequence *seq, const Interval *interval, TSequence **result)
 Transform the temporal number discrete sequence value by the time interval. More...
 
static TSequence ** temporal_extend (Temporal *temp, Interval *interval, bool min, int *count)
 Extend the temporal value by the time interval. More...
 
static TSequence ** temporal_transform_wcount (const Temporal *temp, const Interval *interval, int *count)
 Transform the temporal number by the time interval. More...
 
Datum temporal_wagg_transfn (FunctionCallInfo fcinfo, datum_func2 func, bool min, bool crossings)
 Generic moving window transition function for min, max, and sum aggregation. More...
 
static SkipListtemporal_wagg_transfn1 (SkipList *state, Temporal *temp, Interval *interval, datum_func2 func, bool min, bool crossings)
 Generic moving window transition function for min, max, and sum aggregation. More...
 
Datum temporal_wagg_transform_transfn (FunctionCallInfo fcinfo, datum_func2 func, TSequence **(*transform)(const Temporal *, const Interval *, int *))
 Transition function for moving window count and average aggregation for temporal values. More...
 
PGDLLEXPORT Datum Temporal_wcount_transfn (PG_FUNCTION_ARGS)
 Transition function for moving window count aggregation for temporal values. More...
 
PGDLLEXPORT Datum Tfloat_wmax_transfn (PG_FUNCTION_ARGS)
 Transition function for moving window maximun aggregation for temporal float values. More...
 
PGDLLEXPORT Datum Tfloat_wmin_transfn (PG_FUNCTION_ARGS)
 Transition function for moving window minimun. More...
 
PGDLLEXPORT Datum Tfloat_wsum_transfn (PG_FUNCTION_ARGS)
 Transition function for moving window sum aggregation for temporal float values. More...
 
static int tinstant_extend (const TInstant *inst, const Interval *interval, TSequence **result)
 Extend the temporal instant value by the time interval. More...
 
static int tinstant_transform_wcount (const TInstant *inst, const Interval *interval, TSequence **result)
 Transform the temporal number instant value by the time interval. More...
 
static TSequencetinstant_transform_wcount1 (TimestampTz lower, TimestampTz upper, bool lower_inc, bool upper_inc, const Interval *interval)
 Construct a sequence with a value 1 by extending the two bounds by the time interval. More...
 
PGDLLEXPORT Datum Tint_wmax_transfn (PG_FUNCTION_ARGS)
 Transition function for moving window maximun aggregation for temporal integer values. More...
 
PGDLLEXPORT Datum Tint_wmin_transfn (PG_FUNCTION_ARGS)
 Transition function for moving window minimun aggregation for temporal integer values. More...
 
PGDLLEXPORT Datum Tint_wsum_transfn (PG_FUNCTION_ARGS)
 Transition function for moving window sum aggregation for temporal integer values. More...
 
static int tintseq_transform_wavg (const TSequence *seq, const Interval *interval, TSequence **result)
 Transform the temporal integer sequence value into a temporal double and extend it by a time interval. More...
 
static int tintseqset_transform_wavg (const TSequenceSet *ss, const Interval *interval, TSequence **result)
 Transform the temporal integer sequence set value into a temporal double and extend it by a time interval. More...
 
static TSequence ** tnumber_transform_wavg (const Temporal *temp, const Interval *interval, int *count)
 Transform the temporal integer sequence set value into a temporal double and extend it by a time interval. More...
 
PGDLLEXPORT Datum Tnumber_wavg_transfn (PG_FUNCTION_ARGS)
 Transition function for moving window average aggregation for temporal values. More...
 
static int tnumberdiscseq_transform_wavg (const TSequence *seq, const Interval *interval, TSequence **result)
 Transform the temporal number into a temporal double and extend it by the time interval. More...
 
static int tnumberinst_transform_wavg (const TInstant *inst, const Interval *interval, TSequence **result)
 Transform the temporal number into a temporal double and extend it by the time interval. More...
 
static int tsequenceset_extend (const TSequenceSet *ss, const Interval *interval, bool min, TSequence **result)
 Extend the temporal sequence set value by the time interval. More...
 
static int tsequenceset_transform_wcount (const TSequenceSet *ss, const Interval *interval, TSequence **result)
 Transform the temporal number sequence set value by the time interval. More...