MobilityDB 1.1
Functions
temporal_aggfuncs.c File Reference
#include "general/temporal_aggfuncs.h"
#include <assert.h>
#include <math.h>
#include <string.h>
#include <postgres.h>
#include <utils/timestamp.h>
#include <meos.h>
#include <meos_internal.h>
#include "general/skiplist.h"
#include "general/temporaltypes.h"
#include "general/temporal_tile.h"
#include "general/tbool_boolops.h"
#include "general/doublen.h"
#include "general/time_aggfuncs.h"
Include dependency graph for temporal_aggfuncs.c:

Functions

Datum datum_max_float8 (Datum l, Datum r)
 Return the maximum value of the two arguments. More...
 
Datum datum_max_int32 (Datum l, Datum r)
 Return the maximum value of the two arguments. More...
 
Datum datum_max_text (Datum l, Datum r)
 Return the maximum value of the two arguments. More...
 
Datum datum_min_float8 (Datum l, Datum r)
 Return the minimum value of the two arguments. More...
 
Datum datum_min_int32 (Datum l, Datum r)
 General aggregate functions for temporal types. More...
 
Datum datum_min_text (Datum l, Datum r)
 Return the minimum value of the two arguments. More...
 
Datum datum_sum_double2 (Datum l, Datum r)
 Return the sum of the two arguments. More...
 
Datum datum_sum_double3 (Datum l, Datum r)
 Return the sum of the two arguments. More...
 
Datum datum_sum_double4 (Datum l, Datum r)
 Return the sum of the two arguments. More...
 
Datum datum_sum_float8 (Datum l, Datum r)
 Return the sum of the two arguments. More...
 
SkipList * tbool_tand_transfn (SkipList *state, const Temporal *temp)
 Transition function for temporal and of temporal booleans. More...
 
SkipList * tbool_tor_transfn (SkipList *state, const Temporal *temp)
 Transition function for temporal count of temporal booleans. More...
 
SkipList * tcontseq_tagg_transfn (SkipList *state, const TSequence *seq, datum_func2 func, bool crossings)
 Generic transition function for aggregating temporal values of sequence subtype. More...
 
TSequence * tcontseq_transform_tagg (const TSequence *seq, TInstant *(*func)(const TInstant *))
 Transform a temporal sequence value for aggregation. More...
 
static TSequence * tcontseq_transform_tcount (const TSequence *seq)
 Transform a temporal sequence value into a temporal integer value for performing temporal count aggregation. More...
 
SkipList * tdiscseq_tagg_transfn (SkipList *state, const TSequence *seq, datum_func2 func)
 Generic transition function for aggregating temporal discrete sequence values. More...
 
TInstant ** tdiscseq_transform_tagg (const TSequence *seq, TInstant *(*func)(const TInstant *))
 Transform a temporal discrete sequence value for aggregation. More...
 
static TInstant ** tdiscseq_transform_tcount (const TSequence *seq)
 Transform a temporal discrete sequence value into a temporal integer value for performing temporal count aggregation. More...
 
Span * temporal_extent_transfn (Span *p, const Temporal *temp)
 Transition function for temporal extent aggregate of temporal values. More...
 
SkipList * temporal_tagg_combinefn (SkipList *state1, SkipList *state2, datum_func2 func, bool crossings)
 Generic combine function for aggregating temporal values. More...
 
Temporal * temporal_tagg_finalfn (SkipList *state)
 Generic final function for aggregating temporal values. More...
 
SkipList * temporal_tagg_transfn (SkipList *state, const Temporal *temp, datum_func2 func, bool crossings)
 Generic transition function for aggregating temporal values of sequence set subtype. More...
 
SkipList * temporal_tagg_transform_transfn (SkipList *state, const Temporal *temp, datum_func2 func, bool crossings, TInstant *(*transform)(const TInstant *))
 Transition function for aggregating temporal values that require a transformation to each composing instant/sequence. More...
 
SkipList * temporal_tcount_transfn (SkipList *state, const Temporal *temp)
 Generic transition function for temporal aggregation. More...
 
Temporal ** temporal_transform_tagg (const Temporal *temp, int *count, TInstant *(*func)(const TInstant *))
 Transform a temporal value for aggregation. More...
 
Temporal ** temporal_transform_tcount (const Temporal *temp, int *count)
 Transform a temporal value into a temporal integer value for performing temporal count aggregation (dispatch function) More...
 
SkipList * tfloat_tmax_transfn (SkipList *state, const Temporal *temp)
 Transition function for temporal count of temporal values. More...
 
SkipList * tfloat_tmin_transfn (SkipList *state, const Temporal *temp)
 Transition function for temporal count of temporal values. More...
 
SkipList * tfloat_tsum_transfn (SkipList *state, const Temporal *temp)
 Transition function for temporal count of temporal values. More...
 
TInstant ** tinstant_tagg (TInstant **instants1, int count1, TInstant **instants2, int count2, datum_func2 func, int *newcount)
 
SkipList * tinstant_tagg_transfn (SkipList *state, const TInstant *inst, datum_func2 func)
 Generic transition function for aggregating temporal values of instant subtype. More...
 
TSequence * tinstant_tavg_finalfn (TInstant **instants, int count)
 Final function for temporal average aggregation of temporal instat values. More...
 
static TInstant * tinstant_transform_tcount (const TInstant *inst)
 Transform a temporal instant value into a temporal integer value for performing temporal count aggregation. More...
 
SkipList * tint_tmax_transfn (SkipList *state, const Temporal *temp)
 Transition function for temporal count of temporal values. More...
 
SkipList * tint_tmin_transfn (SkipList *state, const Temporal *temp)
 Transition function for temporal count of temporal values. More...
 
SkipList * tint_tsum_transfn (SkipList *state, const Temporal *temp)
 Transition function for temporal count of temporal values. More...
 
TBox * tnumber_extent_transfn (TBox *box, const Temporal *temp)
 Transition function for temporal extent aggregate of temporal numbers. More...
 
Temporal * tnumber_tavg_finalfn (SkipList *state)
 Final function for temporal average aggregation. More...
 
SkipList * tnumber_tavg_transfn (SkipList *state, const Temporal *temp)
 Transition function for temporal average of temporal numbers. More...
 
TInstant * tnumberinst_transform_tavg (const TInstant *inst)
 Transform a temporal number into a temporal double2 value for performing temporal average aggregation. More...
 
TSequence ** tsequence_tagg (TSequence **sequences1, int count1, TSequence **sequences2, int count2, datum_func2 func, bool crossings, int *newcount)
 Generic aggregate function for temporal sequences. More...
 
static int tsequence_tagg1 (const TSequence *seq1, const TSequence *seq2, datum_func2 func, bool crossings, TSequence **result)
 Generic aggregate function for temporal sequences. More...
 
TSequenceSet * tsequence_tavg_finalfn (TSequence **sequences, int count)
 Final function for temporal average aggregation of temporal sequence values. More...
 
SkipList * tsequenceset_tagg_transfn (SkipList *state, const TSequenceSet *ss, datum_func2 func, bool crossings)
 Generic transition function for aggregating temporal values of sequence set subtype. More...
 
TSequence ** tsequenceset_transform_tagg (const TSequenceSet *ss, TInstant *(*func)(const TInstant *))
 Transform a temporal sequence set value for aggregation. More...
 
static TSequence ** tsequenceset_transform_tcount (const TSequenceSet *ss)
 Transform a temporal sequence set value into a temporal integer value for performing temporal count aggregation. More...
 
SkipList * ttext_tmax_transfn (SkipList *state, const Temporal *temp)
 Transition function for temporal max of temporal text values. More...
 
SkipList * ttext_tmin_transfn (SkipList *state, const Temporal *temp)
 Transition function for temporal min of temporal text values. More...