MobilityDB  1.0
Functions
temporal_waggfuncs.c File Reference

Window temporal aggregate functions. More...

#include "general/temporal_waggfuncs.h"
#include <utils/builtins.h>
#include <utils/timestamp.h>
#include "general/temporaltypes.h"
#include "general/tempcache.h"
#include "general/temporal_util.h"
#include "general/doublen.h"
#include "general/time_aggfuncs.h"
#include "general/temporal_aggfuncs.h"
Include dependency graph for temporal_waggfuncs.c:

Functions

static int tinstant_extend (TSequence **result, const TInstant *inst, const Interval *interval)
 Extend the temporal instant value by the time interval. More...
 
static int tinstantset_extend (TSequence **result, const TInstantSet *ti, const Interval *interval)
 Extend the temporal instant set value by the time interval. More...
 
static int tsequence_extend (TSequence **result, const TSequence *seq, const Interval *interval, bool min)
 Extend the temporal sequence value by the time interval. More...
 
static int tsequenceset_extend (TSequence **result, const TSequenceSet *ts, const Interval *interval, bool min)
 Extend the temporal sequence set 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 (dispatch function) 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...
 
static int tinstant_transform_wcount (TSequence **result, const TInstant *inst, const Interval *interval)
 Transform the temporal number instant value by the time interval. More...
 
static int tinstantset_transform_wcount (TSequence **result, const TInstantSet *ti, const Interval *interval)
 Transform the temporal number instant set value by the time interval. More...
 
static int tsequence_transform_wcount (TSequence **result, const TSequence *seq, const Interval *interval)
 Transform the temporal number sequence value by the time interval. More...
 
static int tsequenceset_transform_wcount (TSequence **result, const TSequenceSet *ts, const Interval *interval)
 Transform the temporal number sequence set 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 (dispatch function) More...
 
static int tnumberinst_transform_wavg (TSequence **result, const TInstant *inst, const Interval *interval)
 Transform the temporal number into a temporal double and extend it by the time interval. More...
 
static int tnumberinstset_transform_wavg (TSequence **result, const TInstantSet *ti, const Interval *interval)
 Transform the temporal number into a temporal double and extend it by the time interval. More...
 
static int tintseq_transform_wavg (TSequence **result, const TSequence *seq, const Interval *interval)
 Transform the temporal integer sequence value into a temporal double and extend it by a time interval. More...
 
static int tintseqset_transform_wavg (TSequence **result, const TSequenceSet *ts, const Interval *interval)
 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 (dispatch function) More...
 
static SkipListtemporal_wagg_transfn1 (FunctionCallInfo fcinfo, 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_transfn (FunctionCallInfo fcinfo, 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 tint_wmin_transfn (PG_FUNCTION_ARGS)
 Transition function for moving window minimun aggregation for temporal integer values. More...
 
PGDLLEXPORT Datum tfloat_wmin_transfn (PG_FUNCTION_ARGS)
 Transition function for moving window minimun. More...
 
PGDLLEXPORT Datum tint_wmax_transfn (PG_FUNCTION_ARGS)
 Transition function for moving window maximun aggregation for temporal integer values. More...
 
PGDLLEXPORT Datum tfloat_wmax_transfn (PG_FUNCTION_ARGS)
 Transition function for moving window maximun aggregation for temporal float values. More...
 
PGDLLEXPORT Datum tint_wsum_transfn (PG_FUNCTION_ARGS)
 Transition function for moving window sum aggregation for temporal inter values. More...
 
PGDLLEXPORT Datum tfloat_wsum_transfn (PG_FUNCTION_ARGS)
 Transition function for moving window sum aggregation for temporal float values. More...
 
PGDLLEXPORT Datum temporal_wcount_transfn (PG_FUNCTION_ARGS)
 Transition function for moving window count aggregation for temporal values. More...
 
PGDLLEXPORT Datum tnumber_wavg_transfn (PG_FUNCTION_ARGS)
 Transition function for moving window average aggregation for temporal values. More...
 

Detailed Description

Window temporal aggregate functions.