34#ifndef __TEMPORAL_AGGFUNCS_H__
35#define __TEMPORAL_AGGFUNCS_H__
41#include "temporal/temporal.h"
62 void **values,
int count,
datum_func2 func,
bool crossings,
int *newcount,
63 void ***tofree,
int *nfree);
71 void ***tofree,
int *nfree);
External API of the Mobility Engine Open Source (MEOS) library.
#define SKIPLIST_MAXLEVEL
Structure to represent skiplist elements.
Definition: meos_internal.h:704
Datum(* datum_func2)(Datum, Datum)
Definition: meos_internal.h:751
Datum transform(PG_FUNCTION_ARGS)
uintptr_t Datum
Definition: postgres_ext_defs.in.h:7
Structure to represent skiplists that keep the current state of an aggregation.
Definition: meos_internal.h:718
Structure to represent temporal values of instant subtype.
Definition: meos.h:195
Structure to represent temporal values of sequence set subtype.
Definition: meos.h:234
Structure to represent temporal values of sequence subtype.
Definition: meos.h:212
Structure to represent the common structure of temporal values of any temporal subtype.
Definition: meos.h:183
Datum datum_min_float8(Datum l, Datum r)
Return the minimum value of the two arguments.
Definition: temporal_aggfuncs.c:91
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 i...
Definition: temporal_aggfuncs.c:999
SkipList * tinstant_tagg_transfn(SkipList *state, const TInstant *inst, datum_func2 func)
Generic transition function for aggregating temporal values of instant subtype.
Definition: temporal_aggfuncs.c:726
void temporal_skiplist_splice(SkipList *list, void **values, int count, datum_func2 func, bool crossings)
Insert a new set of values to the skiplist while performing the aggregation between the new values th...
Definition: temporal_aggfuncs.c:363
Datum datum_sum_double4(Datum l, Datum r)
Return the sum of the two arguments.
Definition: temporal_aggfuncs.c:165
Datum datum_sum_int32(Datum l, Datum r)
Return the sum of the two arguments.
Definition: temporal_aggfuncs.c:127
Datum datum_sum_float8(Datum l, Datum r)
Return the sum of the two arguments.
Definition: temporal_aggfuncs.c:136
SkipList * temporal_tagg_combinefn(SkipList *state1, SkipList *state2, datum_func2 func, bool crossings)
Generic combine function for aggregating temporal values.
Definition: temporal_aggfuncs.c:835
TSequence ** tsequence_tagg(TSequence **sequences1, int count1, TSequence **sequences2, int count2, datum_func2 func, bool crossings, int *newcount)
Generic aggregate function for temporal sequences.
Definition: temporal_aggfuncs.c:623
Datum datum_max_float8(Datum l, Datum r)
Return the maximum value of the two arguments.
Definition: temporal_aggfuncs.c:100
Temporal ** temporal_transform_tcount(const Temporal *temp, int *count)
Transform a temporal value into a temporal integer value for performing temporal count aggregation (d...
Definition: temporal_aggfuncs.c:1159
Datum datum_max_int32(Datum l, Datum r)
Return the maximum value of the two arguments.
Definition: temporal_aggfuncs.c:82
Datum datum_sum_double3(Datum l, Datum r)
Return the sum of the two arguments.
Definition: temporal_aggfuncs.c:155
void ** temporal_skiplist_merge(void **spliced, int spliced_count, void **values, int count, datum_func2 func, bool crossings, int *newcount, void ***tofree, int *nfree)
Return the new values obtained by merging the segment of the list that overlaps with the new set of t...
Definition: temporal_aggfuncs.c:338
int temporal_skiplist_common(SkipList *list, void **values, int count, int *lower, int *upper, int update[SKIPLIST_MAXLEVEL])
Determine the segment of the list that overlaps with the new set of temporal values.
Definition: temporal_aggfuncs.c:250
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.
Definition: temporal_aggfuncs.c:786
SkipList * tdiscseq_tagg_transfn(SkipList *state, const TSequence *seq, datum_func2 func)
Generic transition function for aggregating temporal discrete sequence values.
Definition: temporal_aggfuncs.c:746
TInstant ** tinstant_tagg(TInstant **instants1, int count1, TInstant **instants2, int count2, datum_func2 func, int *newcount, void ***tofree, int *nfree)
Generic aggregate function for temporal instants.
Definition: temporal_aggfuncs.c:387
Datum datum_min_int32(Datum l, Datum r)
Temporal aggregate functions.
Definition: temporal_aggfuncs.c:73
Datum datum_min_text(Datum l, Datum r)
Return the minimum value of the two arguments.
Definition: temporal_aggfuncs.c:109
Datum datum_sum_double2(Datum l, Datum r)
Return the sum of the two arguments.
Definition: temporal_aggfuncs.c:145
Temporal ** temporal_transform_tagg(const Temporal *temp, int *count, TInstant *(*func)(const TInstant *))
Transform a temporal value for aggregation.
Definition: temporal_aggfuncs.c:949
SkipList * temporal_tagg_transfn(SkipList *state, const Temporal *temp, datum_func2, bool crossings)
Generic transition function for aggregating temporal values of sequence set subtype.
Definition: temporal_aggfuncs.c:808
SkipList * tcontseq_tagg_transfn(SkipList *state, const TSequence *seq, datum_func2 func, bool interpoint)
Generic transition function for aggregating temporal values of sequence subtype.
Definition: temporal_aggfuncs.c:767
TSequenceSet * tsequence_tavg_finalfn(TSequence **sequences, int count)
Final function for temporal average aggregation of temporal sequence values.
Definition: temporal_aggfuncs.c:1386
TInstant * tnumberinst_transform_tavg(const TInstant *inst)
Transform a temporal number into a temporal double2 value for performing temporal average aggregation...
Definition: temporal_aggfuncs.c:1354
TSequence * tinstant_tavg_finalfn(TInstant **instants, int count)
Final function for temporal average aggregation of temporal instant values.
Definition: temporal_aggfuncs.c:1367
Datum datum_max_text(Datum l, Datum r)
Return the maximum value of the two arguments.
Definition: temporal_aggfuncs.c:118