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...
 
SkipListtbool_tand_transfn (SkipList *state, const Temporal *temp)
 Transition function for temporal and of temporal booleans. More...
 
SkipListtbool_tor_transfn (SkipList *state, const Temporal *temp)
 Transition function for temporal count of temporal booleans. More...
 
SkipListtcontseq_tagg_transfn (SkipList *state, const TSequence *seq, datum_func2 func, bool crossings)
 Generic transition function for aggregating temporal values of sequence subtype. More...
 
TSequencetcontseq_transform_tagg (const TSequence *seq, TInstant *(*func)(const TInstant *))
 Transform a temporal sequence value for aggregation. More...
 
static TSequencetcontseq_transform_tcount (const TSequence *seq)
 Transform a temporal sequence value into a temporal integer value for performing temporal count aggregation. More...
 
SkipListtdiscseq_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...
 
Spantemporal_extent_transfn (Span *p, const Temporal *temp)
 Transition function for temporal extent aggregate of temporal values. More...
 
SkipListtemporal_tagg_combinefn (SkipList *state1, SkipList *state2, datum_func2 func, bool crossings)
 Generic combine function for aggregating temporal values. More...
 
Temporaltemporal_tagg_finalfn (SkipList *state)
 Generic final function for aggregating temporal values. More...
 
SkipListtemporal_tagg_transfn (SkipList *state, const Temporal *temp, datum_func2 func, bool crossings)
 Generic transition function for aggregating temporal values of sequence set subtype. More...
 
SkipListtemporal_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...
 
SkipListtemporal_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...
 
SkipListtfloat_tmax_transfn (SkipList *state, const Temporal *temp)
 Transition function for temporal count of temporal values. More...
 
SkipListtfloat_tmin_transfn (SkipList *state, const Temporal *temp)
 Transition function for temporal count of temporal values. More...
 
SkipListtfloat_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)
 
SkipListtinstant_tagg_transfn (SkipList *state, const TInstant *inst, datum_func2 func)
 Generic transition function for aggregating temporal values of instant subtype. More...
 
TSequencetinstant_tavg_finalfn (TInstant **instants, int count)
 Final function for temporal average aggregation of temporal instat values. More...
 
static TInstanttinstant_transform_tcount (const TInstant *inst)
 Transform a temporal instant value into a temporal integer value for performing temporal count aggregation. More...
 
SkipListtint_tmax_transfn (SkipList *state, const Temporal *temp)
 Transition function for temporal count of temporal values. More...
 
SkipListtint_tmin_transfn (SkipList *state, const Temporal *temp)
 Transition function for temporal count of temporal values. More...
 
SkipListtint_tsum_transfn (SkipList *state, const Temporal *temp)
 Transition function for temporal count of temporal values. More...
 
TBoxtnumber_extent_transfn (TBox *box, const Temporal *temp)
 Transition function for temporal extent aggregate of temporal numbers. More...
 
Temporaltnumber_tavg_finalfn (SkipList *state)
 Final function for temporal average aggregation. More...
 
SkipListtnumber_tavg_transfn (SkipList *state, const Temporal *temp)
 Transition function for temporal average of temporal numbers. More...
 
TInstanttnumberinst_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...
 
TSequenceSettsequence_tavg_finalfn (TSequence **sequences, int count)
 Final function for temporal average aggregation of temporal sequence values. More...
 
SkipListtsequenceset_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...
 
SkipListttext_tmax_transfn (SkipList *state, const Temporal *temp)
 Transition function for temporal max of temporal text values. More...
 
SkipListttext_tmin_transfn (SkipList *state, const Temporal *temp)
 Transition function for temporal min of temporal text values. More...